To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Sat, 22 Dec 2007 15:40:36
+0000Subject: [flexcoders] Select next DataGrid item after one removed
Hey there,I hava a DataGrid and when I click a Delete Button, the selected
itemgets 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 theother.. as it
is in Yahoo mail.So I tried something like this:oldIndex =
grid.selectedIndex;removeItem(grid.selectedIndex) // functioin that removes
item fromarrayCollectiongrid.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 fromarrayCollectiongrid.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
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/