Hi,
I want to allow multiselects on my datagrid, but only conditionally. i.e.
before the additional item is selected, I want to perform some logic and
determine if it should be selected.
I have tried adding: itemClick, mouseDown, & click listeners which looked like
the following:
private function clickListener(event:Event):void {
event.preventDefault();
_grid.selectedIndices.concat(new
Array(event.currentTarget.selectedIndex);
}
Obviously this doesn't work, but what I have noticed while debugging is that
the grid's selectedIndices is already updated to include the current item (and
exclude the existing item if, SHIFT or CONTROL was not depressed).
Am I not using the right listener? Is there no way to prevent the click, and
then programmatically add the selection?
Thanks