Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ashot Navasardyan on Oct 14, 2008 04:26
open dhtmlx forum
Add Row issue

When adding row with the position, it is adding every time to the last position.

sample:
var rowName = "n_" + (new Date()).valueOf();
pos = 1;
addRow(rowName, array, pos);
Answer posted by Support on Oct 14, 2008 05:54
If position ==-1 or not defined at all - grid will add row to the end of the grid, in any other case, row will be added at specified position. 
( old versions of grid, may ignore pos value, if it greater that count of rows in grid + 1  )

Also, beware, that row position starts from 0 ( first row has position 0 )