Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > JavaScript API > Dashboards API > Methods

Dashboards API: getElementPages

Scroll Prev Next More

 

Returns an array of RunnerPage object specified by ItemId. This function can be useful when dashboard element contains details tables or single record element that has Add, Edit and View pages.  

Syntax

DashboardPage.getElementPages(itemId)

Arguments

itemId

ItemID as it appears in the Page Designer. How to find ItemID?

Return value

An array of RunnerPage objects, that represents the dashboard element, specified by itemId.

Example 1

 

For instance, we have added a button to the grid in the dashboard, that modifies some data in the underlying table. To refresh the grid without reloading the whole dashboard, we add the following code to button's ClientAfter event. Make sure to replace "orders_single" with ItemID of your dashboard element.

 

var pages = Runner.dashboard.getElementPages("orders_single");
pages.forEach(page => {
 page.reload({a:'reload'});
})

Example 2

This example doesn't rely on Dashboards API but it belongs here. It shows how to hide or show the whole dashboard element programmatically.
 

window.dashboard.toggleItem("orders_single");

See also:

getElementPage

 

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software