This question is locked. New answers and comments are not allowed.
We're using a grid to display the results of several different queries, each with different columns.
The Data arrives to the grid as an object (Product) with an Attributes collection. We use a predefined Layout to pull the properties one by one from the bag, and a Converter function that converts the Attribute to a String.
Now, of course, our client want to be able to Filter the view based on any of the columns. Unfortunately, the filter is always applied not against the column of the view but against the Product object itself. I actually created a implicit conversion operator from Product to DateTime (which looked into the property bag & returned the Modified Date) which actually allows you to filter the grid on Modified Date.
Obviously, that's not the solution.
I then attempted to grab the OnFiltering event and FilterDescriptions and convert them to a Predicate, but again, Predicates require a named property of the Object to apply.
We were actually able to add sorting by trapping the Sorting Event and reordering the list ourselves. I could do something like that, but I am afraid I'll only be able to apply one filter at a time if I don't use the built-in Filtering.
Any suggestions or examples?
The Data arrives to the grid as an object (Product) with an Attributes collection. We use a predefined Layout to pull the properties one by one from the bag, and a Converter function that converts the Attribute to a String.
Now, of course, our client want to be able to Filter the view based on any of the columns. Unfortunately, the filter is always applied not against the column of the view but against the Product object itself. I actually created a implicit conversion operator from Product to DateTime (which looked into the property bag & returned the Modified Date) which actually allows you to filter the grid on Modified Date.
Obviously, that's not the solution.
I then attempted to grab the OnFiltering event and FilterDescriptions and convert them to a Predicate, but again, Predicates require a named property of the Object to apply.
We were actually able to add sorting by trapping the Sorting Event and reordering the list ourselves. I could do something like that, but I am afraid I'll only be able to apply one filter at a time if I don't use the built-in Filtering.
Any suggestions or examples?