Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Swaroop on Jun 23, 2009 05:54
open dhtmlx forum
Dhtmlx Grid - How to add a row to first Index of the grid

Hi knowledge Base Team ,


I am working with dhtmlx grid in myb application , I am in need to add a row to the first index of the grid .
When I try to add the row it is always comes to the last index of t he grid .

Please assist me .

Thanks in advance
Swaroop C B
Answer posted by dhxSupport on Jun 23, 2009 05:57
addRow(new_id, text, ind) method has parameters:
new_id - row ID, must be unique
text - row values, may be a comma separated list or an array
ind - index of new row, optional, row added to the last position by default

So to add row to the first position you should use:
mygrid.addRow(new_id,text,0);