issue with updateFromXML dhtmlxGrid to append XML to an exis

hi,



we are using dhtmlx 2.1 suite.



i use loadXMLString to load data into dhtmlxGrid control and later after user perform some action, i need to add new rows to dhtmlxgrid with out clearAll(false); and reload XML file.



For that, i am trying to use

updateFromXML(url, insert_new, del_missed, afterCall)



its adding new rows to Grid but if i send as XML file, but i am looking for updateFromXMLString() in dhtmlx?



How can i load a XML string insteadof XML file using updateFromXML() ?



Ref.

dhtmlx.com/dhxdocs/doku.php?id=d … atefromxml



your quick reply greatly appreciated!


Hello,


instead of updateFromXML() you can use following commands:


grid._refresh_mode=[true,insert_flag, delete_flag];
grid.loadXMLString(…);


Thanks its working. using following code.



 SearchGrid._refersh_mode =[true,true,false];
 SearchGrid.loadXMLString(searchResultXML);



now when i use SearchGrid.getRowsNum() -> It returns me previous row count but not the updated count after loading new rows.



 



 



 


We have tested the following code with the latest grid version - getRowsNum() returns correct number of rows (including new rows):


SearchGrid._refresh_mode =[true,true,false];
SearchGrid.loadXMLString("…");


SearchGrid.getRowsNum();


There is an issue in your code - should be _refresh_mode instead of ._refersh_mode

my bad, its working