Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jan 15, 2010 00:21
open dhtmlx forum
without selection set the column value

Hello,

I want to set column value but not selected value of column using getSelectedCellIndex . i want to add column value automatically in all column but different values.

grid.cells(grid.getRowID(), grid.getSelectedCellIndex()).setValue(name[0]);


with the help of above function i want to show data in different column of different rows. please tell me wht i do

waiting for reply


Regards
Suraj
Answer posted by Stanislav (support) on Jan 15, 2010 02:28
you can use grid.forEachRow to process all rows in the grid, index value - just an integer from 0 to column count

grid.forEachRow(function(id){
        grid.cells(id, 1).setValue(some); // 1 - index of column, can be replaced with necessary one
});

http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:iterating