Thanks to those who have replied.

I am indeed executing this code inside the itemclick handler, but I
just didn't know how to manipulate the list.

When it was mentioned that the grid is not going to be aware of any
array functions performed directly on the selectedItems array, I
altered the code to do a shallow copy with concat and performed the
splicing of the items on the clone.  I then copied it back to the
selectedItems array.

It is working well, EXCEPT for one problem...

Consider the following:  you have a grid with many items.  You click
one item, then shift-click a few items down.  All of the items are
selected.  You then hold shift and click a second time further down -
the selected list is expanded to the new clicked item.

This mechanism is broken when my code executes.  You can click, and 
shift-click once to select multiple items, but if you try to
shift-click again it will not work.

I traced into the handler, and noted the following:
* if my code is not active, and the user shift-clicks a second time,
then the selectedItems array contains all items
* if my code IS active, the the number of selected items stays the
same as the initial shift-click.  Also, the selectedItem property is
no longer null.

What this suggests is that there is some other mechanism at work to
track shift-clicked items, and this is getting messed up when I
reassign the selectedItems array.

It works great except for this one thing - does anyone have any insight?



Reply via email to