Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by karel on May 01, 2008 08:24
open dhtmlx forum
server side paging, grid.limit, total_count attrbiute and uploadFomXML

Hi,

I use grid with the implemented server side paging with the usage of loadXML() and uploadFromXML() grid functions.
Grid is initially loaded by loadXML(). I use grid.limit value (set by total_count attribute value) for determinig total pages count.
The next pages are received by calling uploadFromXML() function. In that case grid.limit value is not updated by
total_count attribute value. And i cannot determine total page count. When I use instead of uploadFromXML() loadXML()
function the grid.limit value is updated but the grid blinks during the rendering in browser and i want avoid this blink.


Is it possible to do something with that or the way how to handle it?

Thanx. (I have commercial licence)
Answer posted by Support on May 02, 2008 05:21
While described scenario is really can be used, it was not expected. The both updateFromXML and loadXML was not expected to work in such use-case.
You can use some custom code to implement workaround necessary in your case

mygrid.attachEvent("onXLE",function(){
    //will be called after each xml loading
    mygrid.limit = this.xmlLoader.doXPath("//rows")[0].getAttribute("total_count");
    mygrid.changePage(mygrid.currentPage); // force redrawing of paging area, optional
});

such code will update limit value after each XML loading
Answer posted by karel on May 02, 2008 07:04

Thank you very much, this the exactly what I looked for.

I would like to ask another question. Is it possible to get XML schema (XSD) for grid?

Thanx.

 

 

 

Answer posted by Support on May 02, 2008 08:12