Here is the deal... I have an XMLListCollection as a dataProvider for a
dataGrid, so that I can use custom sort and filterfunctions. My
application provides for editing selected items (=rows)  in the Grid,
and when an edit is done, I update the Grid, by setting values of the
selectedItem, e.g.

myGrid.selectedItem.dataField = newValue;

This works fine, if I have no filterFunction defined for the
XMLListCollection. The updates happen inplace, the Grid is updated and
the selectedItem (=row) is still highlighted, i.e. selected.

The moment, I specify a filterFunction (one that returns "true" for all
records, mind you), any update to a field in the current "selectedItem"
will resort the Grid (no sort object specified, and the dataGrid column
sort is set to false), and the item is always sorted second last in the
grid. At the same time the selectedItem property is lost (set to null).

I know how to disable and enableAutoUpdate (to avoid loosing the
selectedItem), but it still does not explain, why the grid data gets
resorted....

Any insight from the pros?

Thanks

Iko

Reply via email to