Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Saravana on Sep 10, 2007 09:12
open dhtmlx forum
dHtmlGrid: setXMLAutoLoading

I have all data in my servlet. Now i want to load the data while scroll down. If i use enableBuffering, it is taking time to load the data and also there is no smoothness. So i want to use setXMLAutoLoading. I am calling the servlet class from loadXML method. How to achieve this. please help me. Thanks
Answer posted by Stanislav on Sep 10, 2007 14:21

grid.setXMLAutoLoading(filePath);

each time when new row will be necessary grid will load xml from path mentioned in filePAth, it will add to filePAth "rowsLoaded" variable to show from which position data requested


for example you have
    grid.setXMLAutoLoading("my.jsp");
    grid.loadXML("my.jsp");


initial call of my.jsp return 100 rows ( for example), after you scroll to the end of list, grid will send request to server
    my.jsp?rowsLoaded=100
and will expect that jsp code return xml for next 100 rows; second time it will call
    my.jsp?rowsLoaded=200