Dhtmlx grid add row manually

Hi i want to populate the dhtmlx grid manually fro example my grid has got popultated with NoData.xml file on page load, onc ethe page gets loaded the user edits the cell in the grid



NoData.xml



<?xml version="1.0" encoding="UTF-8"?>



column #1





No data









mygrid1.attachEvent(“onXLE”,function(){

document.body.style.cursor=“default”;

this.entBox.style.cursor=‘default’; });

mygrid1.loadXML("…/NoData.xml");

mygrid1.attachEvent(“onXLE”,function(){

if(mygrid1.getRowsNum()==0){mygrid1.clearAll();mygrid1.loadXML("…/NoConData.xml");} });



the user edits the cell c1 and enters the data needed now i want to add another row with different id and enter the celll value in the 2 row. can you suggets me how to do this…







Please beware that
a) second call on attachEvent will not override previously assigned event
b) the command called after loadXML may be executed before data really loaded in grid ( loading is async )

>>the user edits the cell c1 and enters the data needed now i want to add
another row with different id and enter the celll value in the 2 row.
mygrid.attachEvent(“onEditCell”,function(stage,id,ind){
     if (stage == 2 ){
          mygrid.addRow(mygrid.uid(),“some value”);
     }
      return true;
});