Suppose you have the following definitions:
I show a collection of Dish objects in a RadGridView. As property Categories is a collection I concatenate the values into a single string, e.g. "Spicy, Fat". Now I would like to add some custom filtering behavior that makes it possible to this on the Categories column:
Grid content [Name: Categories]
- Filet Mignon: Expensive, Fat
- Sausage: Fat
- Thai Curry: Spicy, Tasty
If I select values Fat and Expensive I should see the rows for FiletMignon (matches both) and Sausage (matches Fat).
If I select values Spicy and Expensive I should see the rows for FiletMignon (matches Expensive) and ThaiCurry (matches Spicy).
I would be more than grateful for some help on this so thanks in advance!
public
enum
Category { Spicy, Fat, Tasty, Expensive};
public
class
Dish
{
public
string
Name {
get
;
set
;}
public
Category[] Categories {
get
;
set
;}
}
I show a collection of Dish objects in a RadGridView. As property Categories is a collection I concatenate the values into a single string, e.g. "Spicy, Fat". Now I would like to add some custom filtering behavior that makes it possible to this on the Categories column:
- Show a sorted list of all the values in the Category enum (or perhaps only the values that are used by the Dish objects in the grid)
- Use a CheckedList so that more than one value can be selected.
- When more than one Category is used in the filter I want to see all items having at least one of the grades (i.e. an OR condition).
Grid content [Name: Categories]
- Filet Mignon: Expensive, Fat
- Sausage: Fat
- Thai Curry: Spicy, Tasty
If I select values Fat and Expensive I should see the rows for FiletMignon (matches both) and Sausage (matches Fat).
If I select values Spicy and Expensive I should see the rows for FiletMignon (matches Expensive) and ThaiCurry (matches Spicy).
I would be more than grateful for some help on this so thanks in advance!