hasRangesToLoad();
The hasRangesToLoad method determines whether there are visible ranges, data for which must be loaded from source.
This method returns True if there are visible ranges data for which must be loaded from a source, otherwise this method returns False.
To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Scroll the table to maximum number of rows and columns, loading data from the source if necessary:
var maxRows = tabSheet.getMeasures().getMaxRow(); var maxColumns = tabSheet.getMeasures().getMaxColumn(); var iterationsCount = maxColumns > maxRows ? maxColumns : maxRows; for (var i = 0; i < iterationsCount; i++) { if (i < maxRows) { // Scroll table by one row tabSheet.scrollToRow(i) }; if (i < maxColumns) { // Scroll table by one column tabSheet.scrollToColumn(i) }; // Determine whether there are visible ranges, data for which must be loaded from source if (tabSheet.hasRangesToLoad()) { // Call source data loading event tabSheet.MetaChanged.fire(sender, PP.Ui.TabSheetMetaChangeType.Measures); // Load visible table ranges tabSheet.loadVisibleRanges() } };
After executing the example the table is scrolled to maximum number of rows and columns:
See also: