Just what the title says: is there a way to insert an XML string directly into a row in the pro version?
So instead of parsing the entire grid as
…<cell…
I can insert just one row:
……
Thanks in advance!
Grid doesn’t support such operation as adding new rows from XML string, but you can use grid.updateFromXML command , which adds any new row from XML.
By default command oriented of loading data from remove url, not from string, but it can be workarounded as
grid._refresh_mode=[true,true];
grid.parse(“xml string here”); //xml string as “<row id=“XX”>……”
So I have:
mygrid._refresh_mode=[true,true];
mygrid.parse("fdsaffdsaffdsaffdsaffdsaffdsaffdsaffdsaffdsaffdsaffdsaffdsaffdsafwwww");
If row with id 24 does not exist, then it should create a new one, right?
This doesn't seem to be working, I keep getting that "doXPath(..).0 is null or not an object".
Issue confirmed.
As it was mentioned - updateFromXML was designed to be used with remote url, and not works with local data as expected.
Drop attached patch after common grid’s files - it will resolve problem. ( the same fix will be added to main codebase )
patch.zip (751 Bytes)
where/how do i insert this patch??
thanks
Just add this code after all other js files ( or to the end of dhtmlxgrid.js )
This patch provides the desired behavior (e.g. “appending” new rows). It appears to cause a regression issue when interactively selecting multiple rows, and invoking .deleteSelectedRows() failing after the first selection set deletion with the error:
this._fillers is undefined
Regards,
Dirk
Such issue can be reconstructed if you are using it with dhtmlxgrid 2.0 and combination of srnd and split modes.
Please contact us directly at support@dhtmlx.com , we will provide updated version which contains above patch and has not problem with split+srnd modes.