onDataRequest

fires when data from the server is requested for linear data structures (List, DataTable, DataView etc.) to implement dynamic data loading

void onDataRequest(number start,number count, [function callback,string url] );
startnumberthe position which data starts to be loaded from
countnumberthe count of records that need loading
callbackfunctionthe method called after data loading
urlstringthe data URL

Example

dtable.attachEvent("onDataRequest", function (start, count) {
  var data = custom_load_data(start, count);
  dtable.parse(data, "json");
  return false; //cancelling default behavior
});

Details

Dynamic loading for linear data structures is triggered during scrolling and paging. For hierarchical data structures such as Tree or TreeTable, dynamic data loading is triggered when nodes with the webix_kids flag are expanded.

The component will use the data source specified by its url property or via the url parameter passed to the load method.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript framework and page of treemap visualization product.