Skip to content

mapSelection

executes a method for all cells in the currently selected block

function mapSelection(
// the callback function
callback: function
): void
// turn text in selected cells to uppercase
dgrid.mapSelection(function(value, row_id, column_id, row_ind, col_ind){
return value.toString().toUpperCase();
});

also check the next samples:

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

Articles

API