Hello,
I have a grid that I am smart rendering with full backend support for it. So I have to pass back the filters and some other data. The problem I was running into was that the url had the potential to be too long and so I looked into switching over to using the grid post method. The problem that I am now running into is that after the initial POST, subsequent calls are made as GET calls which is not the desired behavior. Is there a way to fix this so I can use post with smart rendering?
Thanks!
You may try to call your own requests from the onDynXLS event:
docs.dhtmlx.com/api__dhtmlxgrid_ … event.html
Thank you. This is working to an extent, but I am having an issue with the onDynXLS event firing immediately. After the post call completes, onDynXLS event fires with the correct start, but the count is all of the remaining rows (i.e. start with 2000 rows, request 200: after first call count is 1800, after second call count is 1600, etc.). I hardcoded the count that I want, and it just continues to fire the event each time the post comes back using the new start until all of the rows are loaded.
grid.attachEvent("onDynXLS", function(start, count){
console.log(start); //gives correct result
console.log(count); //gives full count of rows
this.grid.post(this.url + "&count=200&posStart=" + start, request, "json");
});
grid.post(this.url, request, "json");
Also, as a side note, grid.post with three arguments (no callback) throws an error because the check to set the type correctly from the third argument checks for 2 instead of 3 arguments.