Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by joy on Jun 22, 2009 02:06
open dhtmlx forum
Add new Row in grid

Hi,
Adding new row in grid focus is on previous row not on the current row.
Answer posted by dhxSupport on Jun 22, 2009 02:23
Method addRow() doesn't automatically select new row. To select new row in grid you should use selectRow() or selectRowById() methods:
function doAddRow(){
  var newId = (new Date()).valueOf();  
  grid.addRow(newId,"text1,text2",1);
  grid.selectRowById(newId);
  }