Available only in PRO Edition
This functionality requires PRO version of the dhtmlxGrid (or DHTMLX suite) package.
To load data dynamically from the server you can make use of the LazyDataProxy helper while loading data into dhtmlxGrid or dhtmlxList. This helper allows getting data partially, on demand, and rendering only those records that are in the visible area.
Read the related articles for detailed information about how to display large lists and tabular data efficiently:
Initialize LazyDataProxy with the dhx.LazyDataProxy object constructor. The constructor takes two parameters:
new dhx.LazyDataProxy("https://docs.dhtmlx.com/suite/backend/lazyload", {
limit: 30,
prepare: 5,
delay: 150,
from: 0
});
There is a list of parameters that you can specify in the configuration object. All parameters are optional.
Server side will send the following data to the client side:
data: [
{country: "DR Congo", population: "84004989", yearlyChange: "0.0328"}
{country: "Germany", population: "82293457", yearlyChange: "0.0022"}
{country: "Iran", population: "82011735", yearlyChange: "0.0105"}
{country: "Turkey", population: "81916871", yearlyChange: "0.0145"}
],
total_count: 233,
from: 15
You can use the updateURL method to update the URL where the data will be loaded or to change parameters for loading data from the backend. The method takes two parameters:
lazyDataProxy.updateURL("https://docs.dhtmlx.com/suite/backend/lazyload", {
limit: 30,
prepare: 5,
delay: 150,
from: 0
});
Back to top