Dynamic loading

By default, the component loads all data at once. But you've got a possibility to configure it, so that data may be loaded on demand.

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

The initial response from server must contain the top level “total_count” parameter that contains information about expected count of items in dataview. Each next request must contain value of “pos” parameter , with info about index of the first record in the set.

For XML:

<data total_count="5000" pos="0">
    <item ...

For JSON:

{
    total_count:5000,
    pos:0,
    0:{ data object here },
    1:{ data object here }
}

There is no need to add extra commands on client-side, presence of total_count parameter will be enough to trigger dynamic loading.

You can define a separate template that's used for items which are not loaded yet:

    view = new dhx.ui({
        view:"dataview",
	container:"data_container",
	type:{
            template:"#Package# : #Version#<br/>#Maintainer#",
            templateLoading:"Loading..."
        }
    });