Using grid.post with enablePaging

Hi,



I am using a gid with paging enabled. When I use grid.loadXML to populate grid the paging works fine with posStart and count available. However, if I use grid.post to populate the grid the paging parameters posStart and count are no longer available …



Dave

The existing logic of dynamical loading, will call grid.load each time when new data need to be fetched.
Basically, if you are loading grid by post - it will work normally except it will use “get” requests to fetch additional data.

You can adjust it in dhtmlxgrid.js , line 5286

    render_dataset:function(min, max){
        …
            this.load(this.xmlFileUrl…

this.load can be replaced with this.post

Hello,

I’ve got the same problem as Dave, but I don’t really want to change your source code. Changes like that make it really hard to upgrade to a newer version of dhtmlxSuite later.
Would it be possible to tell the dhtmlxGrid to use the method “POST” instead of “GET”?
Something like:

grid.enableSmartRendering(true, 400, “post”);

Cheers,
Thomas

Since version 2.0 dhtmlxGrid contains dhtmlxgrid_post.js extension, which adds support for such operations.
dhtmlx.com/docs/products/kb/inde … 0extension

Also you should add “onDynXL” event to your grid :
grid.attachEvent(“onDynXLS”,function(start,count){
grid.post(url,“start=&”+start+“count=”+count);
return false;
})



Thanks a lot!

Works like a charm.

Thomas

PS: The event “onDynXLS” seems not to be in your on-line documentation: dhtmlx.com/docs/products/dhtmlxG … rid_api_ev


>>The event “onDynXLS” seems not to be in your on-line documentation: dhtmlx.com/docs/products/dhtmlxG … rid_api_ev


Thank you for your note. That issue will be fixed at the next Dhtmlx documentation version.