mapSelection
executes a method for all cells in the currently selected block
void mapSelection(function callback);
callback | function | the callback function |
Example
// turn text in selected cells to uppercase
dtable.mapSelection(function(value, row_id, column_id, row_ind, col_ind){
return value.toString().toUpperCase();
});
Related samples
Details
Parameters of the callback function are:
- value - (string,number) the cell value
- row_id - (string,number) the row id
- column_id - (string,number) the column id
- row_ind - (number) the row index of a cell within the selected block
- col_ind - (number) the column index of a cell within the selected block
See also
Back to top