Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by andreea on Jun 04, 2008 04:45
open dhtmlx forum
I have add a new line with mygrid.addRow((mygrid.getRowsNum()+1),"",0), but...

I have add a new line with mygrid.addRow((mygrid.getRowsNum()+1)," , , , , , , ",0) , but i want to edit that line after insertion. How do i do that?
If i put some text they are editable, but i need them to be empty after insertion, and then the user to add his data
the header is mygrid.setColTypes("ed,co,co,co,co,ch,ch");
Answer posted by Support on Jun 04, 2008 05:09
Actually the cells must be editable without relation which data was used for row adding ( the editability defined by column type, current cell value doesn't matter )

You can switch row to edit state after addition by using next code
    var id=;
    mygrid.addRow((mygrid.getRowsNum()+1)," , , , , , , ",0);
    mygrid.selectCell(0,0)
    mygrid.editCell();