eachRow
iterates over all rows in the grid
function eachRow( // the handler function that receives one parameter - the ID of the data record (row) handler: function, // if true, hidden rows are included into a loop all?: boolean): void
Example
Section titled “Example”dgrid.eachRow(function(row){ const record = dtable.getItem(row); // { id:row, title:"Film", year:2019 } record.title += " (" + record.year +")"; delete record.year; this.updateItem(row, record);});
Details
Section titled “Details”- Basically, the order of iteration is the order in which rows were added to the grid, but not necessarily so.
- If you apply filtering to the grid, only visible rows will be iterated. To iterate all rows, set the all parameter to true.