Hello, I was wondering how to change and/or remove the "root" composite filter in the RadDataFilter. I am loading filters programmatically and I need to change the default "And" to an "Or". If this is not possible, than I just need to remove this root filter and add my own. Please see the code below as well as the attached screen shot. I am using .NET 4.0 (full) and Telerik 2013 Q1. Thank you.
XAML:
<T:RadDataFilter x:Name="filtMain" AutoGenerateItemPropertyDefinitions="False" />
Code Behind:
filtMain.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("FirstName", typeof(string), "First Name"));
filtMain.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("MiddleName", typeof(string), "Middle Name"));
filtMain.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("LastName", typeof(string), "Last Name"));
CompositeFilterDescriptor parent = new CompositeFilterDescriptor() { LogicalOperator = FilterCompositionLogicalOperator.Or };
parent.FilterDescriptors.Add(new FilterDescriptor("FirstName", FilterOperator.EndsWith, "an"));
parent.FilterDescriptors.Add(new FilterDescriptor("MiddleName", FilterOperator.IsEqualTo, "Bob"));
parent.FilterDescriptors.Add(new FilterDescriptor("LastName", FilterOperator.DoesNotContain, "Doe"));
// FilterDescriptors is empty. Where is the root "And" composite that I see on the screen???
filtMain.FilterDescriptors.Add(parent);