Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
Filtering with Virtual Collection
posted

Column Filtering of the grid does not seem to work when using a VirtualCollection as the ItemSource of the grid. When I was using Infragistics 10.1 version, I found that the documentation mentioned that it doesn't work (based on this thread - http://community.infragistics.com/forums/p/41910/233682.aspx). So, I implemented the suggested workaround - to capture the Filtering event of the grid and do the update on my own. After setting up the proper filters, I called VirtualCollection.Refresh() method to reload the filtered data. I call this within the VirtualCollection.DeferRefresh() block.

However, the same code does not work in 10.2 version. It throws a "Cannot perform Refresh when editing or adding a new item" error. I searched for this error in the documentation and could not find any reference to it. In the documentation, it says that in the latest version, the filter conditions will be added to the Virtual Collection's FilterCondition Property and the same code shows how to implement the ItemDataRequested event handler. This does not seem to be the case. The ItemDataRequested is not automatically called when filtering.

Please help.

- Anand