i am using flex4 sdk and flash builder 4.
I have a datagrid where i have to display records initially sorting by name field. But while editing these names in the grid it moves immedially the record
in sorted order. Also adding new records also moves new record in sorted order.
While editing and adding new record i do not want sort enabled.
setting sort field null for arraycollection reorders all the records, that's what i do not want. It should be like user can sort it by column, but while adding and editing record it should be disabled and there should not be any reordering of record when sort is disabled.
Is there any way to implement this, please reply with example if possible.
Thanks in advance
I don't have an example handy, but the basic principle is to copy the sorted
array at some point. When to do so depends a bit on whether you care about
the sort arrow in the columns or not. Use toArray() to copy the sorted
array and replace the dataProvider with the copy (with sort=null).
Thanks for the reply. its actually what i was looking for. It worked for me.
Thanks a lot