How to make the dynamic requests for the
mygrid.parse("xmldata","xml")
instead of the
mygrid.load("/load.xml");
I mean how to load the data from the xml string when the page loads and then when we click the next page it should load. But its not loading up on clicking the next page.
İ think you want your grid first load settings XML after data XML;
İf you want this that is possible but no only dhtmlxGrid function.
Solutions
var myGrid;
function createGrid(containerId){
var myGrid = new dhtmlXGridObject(containerId);
myGrid.loadXML("gridTemplater.php?gridId=1");
myGrid.init();
}
function dataLoadGrid(){
var ajx = .........
........................
..............
myGrid.parse(ajx.responseText);
}
Step 1 . Grid Created Configuration From XML
Step 2 . Create Custom HTTPRequest
Step 3 . MyGrid Parse ResponseText from HttpResponse.
I don’t want to use the ajax request on the load instead i am parsing the xmldata from the div.
mygrid.parse(document.getElementById(‘xml_id’).innerHTML,“xml”);
I have solved this problem with following approach. Hope it can be used for you:
On server side, create a handler for DHTMLXGrid open procedure (“ReloadData”, for example) which executes the sql statement (may use LIMIT clauses, if necessary)
Create another server procedure ("SendOpen, for example) that “sends an event to client” forcing the execution of “open” procedure and, of couse, the “ReloadData” on server.
On server side, whenever you need to start population of grid, exec SendOpen.
Automatic paging will occurs normally through “open” on client and “ReloadData” on server.
Hope this helps.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan