fires after a cell is selected

void onAfterSelect(object selection,boolean preserve);
selectionobjectthe selected object
preservebooleanindicates whether the previous selection state should be saved


some.attachEvent("onAfterSelect", function(selection, preserve){
  //... some code here ...


The selection object depends on the selection mode and includes the following attributes:

  • row - the id of the row with selection
  • column - the id of the column with selection
  • id - the id of the selected item (row, column, or cell, depending on the applied selection mode)

If the multiselect mode is enabled, the event will fire:

  • Each time you select an item with Ctrl+click;
  • Once for each selected item in the group during Shift+click selection.

In each case, the ID of the newly selected item should be passed to the event.

To get the IDs of currently selected items, you can use a combination of the onSelectChange event and the selectRange method.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix widget library and page of datatable product.