Check documentation for the latest version of dhtmlxSuite Dynamic Loading DHTMLX Docs

Dynamic Loading

A component loads all data at once by default, but it's possible to configure the component so that data will be loaded on demand (this mode can be used with paging to organize dynamic paging, or without it )

Dynamic loading can be organized with XML and JSON data sources only.

The initial response from server must contain the total_count parameter at the top level. It will contain the info about the expected count of items in the dataview.

Each next request must contain the pos value with the info about index of the first record in the set.

For XML:

<data total_count="5000" pos="0">
   <item id="1">
    <item id="2">


   {"total_count":"5000","pos":"0", data:[

There is no need for extra commands on the client side, as the presence of the "total_count" parameter will be enough for triggering dynamic loading.

You can define a separate template which will be used for the items which are not loaded yet.

view = new dhtmlXDataView({
        template:"#Package# : #Version#<br/>#Maintainer#",

Related sample:  Dynamic loading

Back to top