Thanks Matt. Unfortunately no luck. Actually, I noticed that after sorting, if you try to select the row that would correspond to the selectedIndex it won’t let you (as if it “thinks” I am already selected...leave me alone). To clarify,

  1. I select row 5 => selectedIndex shows as 4....correct
  2. I sort by one column, the selected item is still selected=highlighted, selectedIndex should now be 2, but isn’t, it’s still 4.
  3. If I now try to select what’s in row 5 (would be selectedIndex 4), it will not let me.

 

validateNow() did not change this. I also tried different dataProvider types, no difference. All the other stuff seems to be working fine, like binding to the custom datagrid, editing cells, etc.

 

More ideas? Thx

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]ups.com [mailto:[EMAIL PROTECTED]ups.com] On Behalf Of iko_knyphausen
Sent: Thursday, November 02, 2006 5:05 PM
To: [EMAIL PROTECTED]ups.com
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