Ticket Q426324
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Documentation - Create a help topic that describes limitations of the ICollectionView interface support

Silverlight grid column filtering doesn't work for enumerated column data (when using CollectionViewSource).

created 13 years ago

We have switched to using a CollectionViewSource for the binding source of a grid and now filtering for enumerated data columns no longer works. N.B. Grouping by enumerated columns is also an issue (i.e. doesn't work) but we expect this is part of the same problem.

I have attached a sample application which uses a CollectionViewSource with 3 data columns. The first is a standard data column and the other 2 are enumerated data (one with and one with out a converter). If you select the filter button on the column header for either of the enumerated data columns the filter list is empty; additionally you can't group by these columns either. Performing the same task for the first column (int data type) it all works fine.

Answers

created 13 years ago (modified 12 years ago)

Hi Oli,
Thank you for your inquiry and providing a sample project. I have reproduced the issue you described. This behavior looks like bug, but I am not sure. I sent this ticket to our R&D team so that our developers can investigate this problem.
As a workaround, I suggest you use the GridColumn.EditSettings property in the following manner:

XML
<dxg:GridColumn FieldName="EnumValue2" Width="200"> <dxg:GridColumn.EditSettings> <dxe:TextEditSettings DisplayTextConverter="{StaticResource MyEnumConverter}"/> </dxg:GridColumn.EditSettings> </dxg:GridColumn>

Updated:
This behavior is caused by limitations of the ICollectionView interface support in our controls. These limitations are caused by specifics of work with the ICollectionView collection. Since this collection implements sorting and filtering operations, DXGrid cannot filter and sort data by using its own internal algorithms (which are used if your datasource is a plain collection). Thus, the grid passes this functionality to the ICollectionView source.
For this reason, it is technically impossible to filter data with the cell display text (since the datasource collection does not know anything about data transformation in the View).
If you have additional questions, feel free to reactivate this thread.
Thanks

    Comments (3)
    DevExpress Support Team 13 years ago

      Hi Oli,
      This behavior is caused by limitations of the ICollectionView interface support in our controls. I apologize, but our documentation does not contain information about these limitations. We will add it in the future.
      As for the main issue, you can avoid it with ease using the FieldName property.
      If you have additional questions, feel free to reactivate this thread.
      Thanks

        There seem to be a number of limitations with the ICollectionView implementation around grouping, filtering and sorting; do you have any plans to fix these limitations/bugs?

        DevExpress Support Team 12 years ago

          In fact, these limitations are caused by specifics of work with the ICollectionView collection. Since this collection implements sorting and filtering operations, DXGrid cannot filter and sort data by using its own internal algorithms (which are used if your datasource is a plain collection). Thus, the grid passes this functionality to the ICollectionView source.
          For this reason, it is technically impossible to filter data with the cell display text (since the datasource collection does not know anything about data transformation in the View).
          If you need to use the ICollectionView datasource, the most appropriate approach to fix these issues is to implement data transformation at the datasource level so that the GridControl works with already modified data.
          Let me know if you need further assistance.
          Thanks

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.