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] ){ ... };

Parameters

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 behaviour
));

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