Hey there,

I hava a DataGrid and when I click a Delete Button, the selected item
gets removed (obviously). But then I want the next item to be selected,
so that you can keep on  pressing Delete and remove one item after the
other.. as it is in Yahoo mail.

So I tried something like this:

oldIndex = grid.selectedIndex;
removeItem(grid.selectedIndex) // functioin that removes item from
arrayCollection
grid.selectedIndex = oldIndex;

=> but then it always selects one after the one I want to be selected.

So I tried something like this:

oldIndex = grid.selectedIndex;
removeItem(grid.selectedIndex) // functioin that removes item from
arrayCollection
grid.selectedIndex = oldIndex -1;

=> but then it always selects one before the one I want to be selected.

Strange.. isnt it?

Any ideas why this is happening..

Cheers, Max




Reply via email to