Select multiple items in data-table

Hi,

Webix registration number is 2560086

I am trying to select multiple items in datatable by using keyboard “SHIFT+navgation” and selected items by “SHIFT+CLICK” with below scenario, But I’m not able to get the expected result. Please check and help me on the below two scenarios.

scenario:1 → When user press SHIFT+Up arrow key and Down arrow key, the selected items on top should be de-selected and the item (which are below of selected item) should be selected.

scenario:2 → The selected items by “SHIFT+CLICK” can not be de-selected. Ex:User selected top item (out of 10) and selected bottom item by holding SHIFT (Now all the 10 items get selected). Now User clicks on 5th item from top by holding SHIFT. Expected is the bottom 5 items should be de-selected and top 5 items should be remain selected.

Please check the snippet: http://webix.com/snippet/7138c42f

Hi, I can confirm the above behavior, but in both cases those not bugs, but expected behaviors. Multiselection in grid works in “add selection” mode only, it can’t be used to deselect rows.

You can override moveSelection API that is called for each selection related hotkey and provide your own reactions. Please contact the support team if you need more details.

Thanks Maksim,
Can you please provide an example to override moveSelection API that is called for each selection related hotkey?

@maksim: I am also searching for the same behaviour.Can u provide an example to override the moveSelection API so that I can deselect the row that I selected previously.

I don’t have a full example.

Check the next

http://webix.com/snippet/85161d25

The base concept is that you can define your own reactions for some actions, and route all others to default selection routine.