This content has been marked as final. Show 5 replies
AdvancedDataGrid internally converts the dataProvider to ICollectionView.
Using IHierarchicalCollectionView(adg.dataProvider).filterFunction will solve this issue.
This not working. It is throwing type conversion error at IHierarchicalCollectionView(adg.dataProvider).filterFunction
I found the solution.
1- store data an ArrayCollection (lets say ac).
2- ac.filterFunction= processFilter // some filter function
3- assign this ArrayCollection to GroupingCollection (lets say gc) as its source.
gc.source = ac
4- assign gc as dataProvider to dataGrid
5- When you want to apply the filter:
You have to call adg.validateNow() after assigning the GroupingCollection as dataProvider to the AdvancedDataGrid and before applying the filterFunction.
It should be like -
adg.dataProvider = gc;
IHierarchicalCollectionView(adg.dataProvider).filterFunction = filterFunc;
Note: The filter function will be applied to group rows also.
Its also not working. It does not call the filterFunction at my side. Did you try it in some sample code at your side?