[DevExpress Support Team: CLONED FROM T187964: 14.2 Token column in DatGrid]
and actually going forward, I dont know how to implement filtering on such column
I tried approach proposed in https://www.devexpress.com/Support/Center/Question/Details/T100910
but dont know how to write a criteria in this implementation
EditValue = CriteriaOperator.Parse(string.Format(@"Contains([MyStringCollectionUnbound], '{0}')", s))
indeed even trying to filter in the standard filter I could not get it properly filtering - the result is empty list (please see the attachment)
Thanks for helping,
Victor
How to filter collection properties
Answers approved by DevExpress Support
Hi Victor,
In your specific scenario (ComboBoxEdit is bound to a collection of objects), this functionality can be implemented using the following approach:
- Set the ColumnFilterMode property to "DisplayText".
- Handle the CustomColumnDisplayText event and set e.DisplayText to a string that will contain values of all items from the cell.
I have attached a sample demonstrating my approach. Please take a moment to review it.
thanks Elliot
I migrated our client to the solution above and would be really looking forward to get the fix (as I can not deliver the next version without it).
Do you know when this bug is expected to be fixed?
Kind regards,
Victor
Hello Victor,
Thank you for your clarification. I cannot provide you with any estimate as to when this issue will be resolved, since it depends on various factors. You will receive an e-mail message when the status of ComboBoxEdit in a GridControl column raises an exception after upgrade to 15.1.4 ticket is changed.
Thanks,
Elliot
Hi Victor,
Please clarify how you wish to filter the column. As far as I can see, each cell in the column is a collection of tokens. Do you wish to display all unique tokens from all the cells within the filter dropdown and choose ones in order to build criteria that will return the collections containing all these tokens? If so, please review the attached sample from Andrey's last comment in How to implement custom filtering in GridColumn with data of List type.
If your scenario is different, please describe it in greater detail. I am looking forward to your reply.
hi Ilya
yes I wanted to provide tokens as a List of strings and then filter by the value chosen
as example I used
https://www.devexpress.com/Support/Center/Question/Details/T100910
it all worked ok except the fact that it didnt filter properly and the part which didnt work was a criteria
Criteria is the same as if one wrote it in a normal filter editor - see the example in the attached image
if I am trying to filter there it doesnt work with any condition
so when I tried to write a condition as in the example it doesnt work for the same reason
Regards,
Victor
I attached the project to illustrate the issue
could you modify the way condition should be written there?
thanks,
Victor