mapSelection

executes a method for all cells in the currently selected block

void mapSelection(function callback);
callbackfunctionthe 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
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.
If you have not checked yet, be sure to visit site of our main product Webix javascript website framework and page of javascript datatable product.