display.grid.applyMap()
The applyMap() method replace grid records with the results of calling a provided function on every element in the grid records array.
Parameter
Callback function that receives the following arguments:
Record object with properties for each field in the grid
Index - the zero-based index of the current grid record being processed
Records array - array representing all of the grid records
The function must return a record object
Example
if (checkAll) { // Check all boxes in the grid
display.grid.applyMap(record => {
record.checked = true;
return record;
});
}