Hello,
I'm working with a RadDaraFilter and a GridView.
The data I show is a list of instances of multiple types that derive from a base type. The derived types have their own set of properties.
Knowing that the data filter wasn't going to go through my derived types' properties, I populated the filter item property definition manually.
Unfortunately, it seems like the data filter only does the filtering on the properties of the base type, or the one the generic collection is of.
Example:
class BaseType
{
string Name { get; set; }
}
class DerivedType1 : BaseType
{
string SubData { get; set; }
}
class DerivedType2 : BaseType
{
string AnotherSubData { get; set; }
}
var list = new List<BaseType>();
// add DerivedType1 and 2 instances to list.
dataFilter.Source = list;
My filter contains the item property definitions for Name, SubData and AnotherSubData.
- Filtering on Name is the only thing that works (guessing because it's in the base type).
- Filtering on SubData and AnotherSubData always results in an empty list in the grid view.
Is there any workarounds for this?
Thanks!
Matt
I'm working with a RadDaraFilter and a GridView.
The data I show is a list of instances of multiple types that derive from a base type. The derived types have their own set of properties.
Knowing that the data filter wasn't going to go through my derived types' properties, I populated the filter item property definition manually.
Unfortunately, it seems like the data filter only does the filtering on the properties of the base type, or the one the generic collection is of.
Example:
class BaseType
{
string Name { get; set; }
}
class DerivedType1 : BaseType
{
string SubData { get; set; }
}
class DerivedType2 : BaseType
{
string AnotherSubData { get; set; }
}
var list = new List<BaseType>();
// add DerivedType1 and 2 instances to list.
dataFilter.Source = list;
My filter contains the item property definitions for Name, SubData and AnotherSubData.
- Filtering on Name is the only thing that works (guessing because it's in the base type).
- Filtering on SubData and AnotherSubData always results in an empty list in the grid view.
Is there any workarounds for this?
Thanks!
Matt