9 Answers, 1 is accepted
If you take a look at the following online help article you may see an example using RadDataFilter "Filter RadGridView". You may also check RadDataFilter's demo directly online, please follow this link.
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
I populate the datafilter with a generic object matching the grids object class and after the datafilter is changed I want to programatically change the grids filtering to match the filters in the datafilter.
Because I have multiple controls filtering the same gridview and I want programmatic control over what filters get applied etc...
Have you checked the Unbound Section of RadDataFilter?
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
I must have totally overlooked that :).
BTW, the filter is really a great tool!
You will have to attach to the RadDataFilter.FilterDescriptors.PropertyChanged event like this:
this
.radDataFilter1.FilterDescriptors.PropertyChanged +=
new
PropertyChangedEventHandler(FilterDescriptors_PropertyChanged);
void
FilterDescriptors_PropertyChanged(
object
sender, PropertyChangedEventArgs e)
{
if
(e.PropertyName ==
"LogicalOperator"
)
{
// I am no sure what you will do here though...
}
}
I hope this helps. Kind regards,
Ross
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
That is my mistake. On the PropertyChanged event handler you can change the LogicalOperator of RadGridView by doing this:
((CompositeFilterDescriptorCollection)this.radGridView.FilterDescriptors).LogicalOperator = <<the logical operator of the RadDataFilter>>
I hope this helps.
Ross
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Thank You
You should add this to that documentation to save others this trouble.