Try calling validateNow() on the DataGrid before requesting the selectedIndex?  It might delay the calculation of the index for performance reasons.

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of iko_knyphausen
Sent: Thursday, November 02, 2006 5:05 PM
To: [email protected]
Subject: [flexcoders] selectedIndex not updated upon column sort in custom dataGrid

 


For the life of it....can't figure it out... I have a dataGrid in a
custom component, and in order to delete rows I use the
dataGrid.selectedIndex (in the dataGrid.dataProvider.removeItemAt
(index) function). All works as expected until you sort the grid by one
column. The selectedItem is still the same, and shows in the grid as
selected, but the selectedIndex is not updated - it still returns the
same index as before the column sort. The selectedIndex gets updated
correctly whenever you select a row with a mouse click.

I tried the same with an original dataGrid (outside a custom component),
and there it works fine. So obviously I am doing something wrong - or
forgetting something that needs to be done inside complex
components...Help? Thanks

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to