Are grids with paging compatible with .updateFromXML() ?
I as as the difficulty I am having at the moment is as follows:
Setup:
var dhxGridb;
dhxGridb = dhxLayout.cells("b").attachGrid();
var sb_b = dhxLayout.cells("b").attachStatusBar();
sb_b.setText("<div id='recinfoArea'></div>");
dhxGridb.setPagingWTMode(true,true,false,true);
dhxGridb.enablePaging(true, 100, null, "recinfoArea");
dhxGridb.setPagingSkin("toolbar", "dhx_skyblue")
dhxGridb.loadXML("fl.php?requestHeader=1");
dhxGridb.attachEvent("onXLE", function(grid_obj,count){
dhxGridb.setSizes();
});
All works well, no issues, the columns, etc. are configured in the XML generated server side. By virtue of the requestHeader parameter, the required info is sent the first time. An example of the return:
[code]
true
1
true
ui-state-highlight
</head>
… row data, etc… [/code]
Further requests to the file do not send the config data, only the row data as prescribed:
<rows total_count='600' pos='100'>
<row id="695" >
...... etc, etc
Again all works well, can page through the grid, everything as usual.
Data is changed up, so we need to refresh something. The following code is used:
var xml_loc = "fl.php?requestHeader=0&posStart="+state[1];
dhxGridb.updateFromXML(xml_loc, true, true);
If this is done on page 1, everything is great…
Lets say were on page 2 (anything accept from page 1)
The request is sent, page comes back, all is well referencing FireBug:
Then requests continue to cycle XML requests from posStart=199, then posStart=198, etc. etc.
If I change up the refresh code to:
var xml_loc = "fl.php?requestHeader=0&posStart="+state[1];
dhxGridb.clearAndLoad(xml_loc);
or
var xml_loc = "fl.php?requestHeader=0&posStart="+state[1];
dhxGridb.clearAll();
dhxGridb.updateFromXML(xml_loc, true, true);
The recursive XML calling does not occur, however even though the XML comes back as it should:
<rows total_count='600' pos='200'>
The grid rec info area shows count 1-100 and no pages