I have a datatable that loads fine on initial page load. When I scroll to the end of the data, no load request is being sent to the server.
`
{view:"datatable", height:300, datatype:"csv",
url:"./testedb.eui", datafetch:50,
datathrottle: 500, loadahead:100,
columns:[
{ id:"year", map:"#data0#", header:["Year", {content:"serverDateRangeFilter"}], format:"webix.i18n.dateFormatStr",width:200},
{ id:"month", map:"#data1#", header:"Month"},
{ id:"day", map:"#data2#", header:"Day"},
{ id:"venue",map:"#data3#", header:"Venue"}
]
}
`
If I select the DateRange filter, it does send off a properly formatted request. Actually two, I don’t know why the first one has “end:null” in it.
12:06:52 start=0&count=50&continue=true&filter[year]={"start":"2017-03-09 00:00","end":"2017-04-27 00:00"}
12:06:51 start=0&count=50&continue=true&filter[year]={"start":"2017-03-09 00:00","end":null}
I’d appreciate any help in understanding why the dynamic loading is not working.
Thanks.
Helga
March 13, 2017, 5:53pm
2
Hi,
Please ensure that your server returns the correct data to enable dynamic loading. There must be data
, pos
and total_count
properties in the response.
As to the serverDateRangeFilter, it sends requests correctly. Selecting either start or end data in the range is considered as value change.
The first request goes when you select the start date in range and presupposes that you should return all data bigger than the defined data, while the second request sends both start and end range properties.
Thank you. But given that I’m providing the load data in csv format (as advised by this page ), how can that be done?
OK, I’ve written a CSV to JSON converter in my server-side program, and now all is well. The data load requests are as I would expect them.
Thank you for your advice.
Helga
March 14, 2017, 9:14am
5
Yep, dynamic loading is supported only by JSON and XMl formats.
Thanks Helga. The documentation does not make that clear, but I inferred it after your initial comment. It’s working fine now.