It sure makes me wiser, thanks! Now let me try to explain my issue a
bit clearer. Maybe it's this simple:

I want to keep the selection in the datagrid in sync with the
selection of the same data in another part of the application. But
when I sort the data in the datagrid I lose the references, becauase
of the mechanism you mention.

Maybe I can just copy the reference to the new item list in the
datagrid. Or if there's some property I can set that does it for me.
It seems to me like the problem is quite general.

/PEZ

--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> The DP makes a new copy of the items and sorts them, leaving the old
> items in their original untouched array or xmllist.
> 
>  
> 
> I don't quite get your issue, but I hope that helps.
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of cobpez
> Sent: Sunday, March 30, 2008 9:12 AM
> To: [email protected]
> Subject: [flexcoders] What happens with dataProvider when you sort a
> List control?
> 
>  
> 
> Hello, I just found both Flex and this group. So here a newbie problem:
> 
> I have a DataGrid (AdvancedDataGrid even) that gets populated from an
> XML source. Selecting an item in the list selects it in another place
> of the application too (let's call it "Space") and also some of the
> item's data is shown in a form. Additionally clicking the item in
> Space selects it in the list and that form is populated the same way.
> The way I link from Space to the list is through an "id" attribute of
> the Space items. Something like so:
> 
> list.selectedItem = _xml_source.items.item.(@id==space_item.id);
> 
> It all works well until I sort the DataGrid. Then that selection
> expression returns null. I've tried see why in the debugger, but I
> can't see it. What am I missing here?
>


Reply via email to