i didn't find solution yet. anyone faced this problem before?
What happens instead? What code are you using to sort and filter?
Feel happy by your presence.
I have my own filterfunction to filter my data. But for sorting i used datagrid's default sort functionality (click on column header to sort data).
When i click on column header to sort and reapply my custom filter function on the dataprovider, Datagrid behaves in different way. I think there is a confusion between filterfunction and sorting.
should i not use datagrid's sort functionlity while i have my own filter function?
I’m pretty sure they both can work together. If you provide more detail and/or show the actual code, it easier for people to help.
I resolved this problem. I loop throw dataprovider and update some properties of dataprovider before apply filterfunction. It works good when sort is not applied.
while sorting is applied, and do the dataprovider updation, datagird dispatch 'collectionchange' event and apply sorting.
For example when i update the property of 0th row, datagrid sorts the dataprovider. now 0th goes to 20th row 20 comes to the 0th index.
Now i increment index to 1. But actually i missed 20th row which is now in 0th index.
So i didn't get my expected result while filter my data. I resolved this problem by the following way.
var ISortTemp:ISort; = this.dataProvider.sort;
this.dataProvider.sort = null;
for (var index:int = 0; index < dataProvider.length; index ++)
dataProvider[index][dgdColumn.dataField].@sel = "0";
this.dataProvider.sort = ISortTemp;
this.dataProvider.filterFunction = FltDataProvider;