Sorry - This is supposed to posted under TreeListView and not TreeView. I will try to repost under TreeListView.
I have a problem where after applying the Filter, it opens up all the nodes.
I am using CompositeFilterDescriptor.
We have a Huge Tree and we don't want the Tree and its children to open after applying the Filter. Any idea how to stop it from opening after applying the Filter?
I am not able to attach the project, but will attach the screen shot.
Here is code snippet.
I have a problem where after applying the Filter, it opens up all the nodes.
I am using CompositeFilterDescriptor.
We have a Huge Tree and we don't want the Tree and its children to open after applying the Filter. Any idea how to stop it from opening after applying the Filter?
I am not able to attach the project, but will attach the screen shot.
Here is code snippet.
private void RadContextMenu_ItemClick(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
if ((e.OriginalSource as RadMenuItem).Header.Equals("Show Spain"))
{
FilterDescriptor descriptor = new FilterDescriptor();
descriptor.Member = "Country";
descriptor.Operator = FilterOperator.IsEqualTo;
descriptor.Value = "Spain";
this.RadTreeListView1.FilterDescriptors.Add(descriptor);
}
CompositeFilterDescriptor mainFilter = new CompositeFilterDescriptor();
if ((e.OriginalSource as RadMenuItem).Header.Equals("Show England"))
{
FilterDescriptor descriptor = new FilterDescriptor();
descriptor.Member = "Country";
descriptor.Operator = FilterOperator.IsEqualTo;
descriptor.Value = "England";
mainFilter.FilterDescriptors.Add(descriptor);
this.RadTreeListView1.FilterDescriptors.Add(mainFilter);
}
if ((e.OriginalSource as RadMenuItem).Header.Equals("Show England - France"))
{
mainFilter = new CompositeFilterDescriptor();
mainFilter.LogicalOperator = FilterCompositionLogicalOperator.Or;
FilterDescriptor descriptor = new FilterDescriptor();
descriptor.Member = "Country";
descriptor.Operator = FilterOperator.IsEqualTo;
descriptor.Value = "England";
mainFilter.FilterDescriptors.Add(descriptor);
descriptor = new FilterDescriptor();
descriptor.Member = "Country";
descriptor.Operator = FilterOperator.IsEqualTo;
descriptor.Value = "France";
mainFilter.FilterDescriptors.Add(descriptor);
this.RadTreeListView1.FilterDescriptors.Add(mainFilter);
}
if ((e.OriginalSource as RadMenuItem).Header.Equals("Clear Filter"))
{
this.RadTreeListView1.FilterDescriptors.RemoveAt(0);
}
}