views:

307

answers:

4

I have an AdvancedDataGrid for which I would like to allow multiple selection. Do to several constraints, I want to disallow selecting items that are next to each other (Basically, you can't select multiple items with the same parent and parents are handled differently from children). My preference would be to stop event propagation when the shift modifier is present on the mouseDown or click event. I tried using event.stopImmediatePropagation(), but the selection has already occurred (I tried stopping mouseDown, click, itemClick, and change).

I am guessing I will need to extend the ADG and override some functions. Does anyone have any ideas to stop this before it modifies the selectedItems array without having to create my own ADG class? Or can anyone point me in the right direction (read: which functions do I need to override in ADG) if I do need to extend ADG?

Thanks!

A: 

Where you able to solve this requierement? As I want to implement the exaxt same thing...

Werner
A: 

Found a way: here

"simply" check in the mouseevent of the click on the datagrid, if the boolean shiftkey is true or not...

Werner
A: 

Maybe listening for the keybaord event, then checking if event.shiftKey is true, if so then calling event.preventDefault().

John Isaacks
A: 

Hi,

While moving between the datagrid cells, if a datagrid column is non editable I need to skip the selection to next editable column.

How can we implement this. any ideas

Rejeev

Rejeev