This is a migrated thread and some comments may be shown as answers.

filtering parents and childrens

3 Answers 61 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 10 Feb 2015, 06:48 PM
Hello:

I have a issue...
when I am populate a treelistview with row details... and i see the options in the filter control just puts the parents and excludes the childrens...
I need filter by the childrens too... what I need to do?

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 11 Feb 2015, 02:09 PM
Hi,

Indeed, the DistinctValues to filter on will be calculated based on the top-level entities only.

When you filter on the Field Filters though, then all the nodes in RadTreeListView that cover the filter will be shown. If their children cover the filtering criteria, then they can be expanded and accessed. If their children should not be shown (as they did not pass the filter), then they cannot be expanded.

You can check this behavior on our TreeListView Demos.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Luis
Top achievements
Rank 1
answered on 24 Feb 2015, 04:46 PM
01.protected virtual void filtering()
02.        {
03.            string dataMember = this.columnFiltering.DataMemberBinding.Path.Path;
04. 
05.            var items = from a in ItemsContainerListBox.ChildrenOfType<CheckBox>() where a.IsChecked == true select (a.DataContext as customItem).Color;
06.            this.compositeFilter.FilterDescriptors.Clear();
07. 
08.            foreach (var item in items)
09.            {
10.                Telerik.Windows.Data.FilterDescriptor filter = new Telerik.Windows.Data.FilterDescriptor(dataMember, Telerik.Windows.Data.FilterOperator.IsEqualTo,item);
11.                 
12.                this.compositeFilter.FilterDescriptors.Add(filter);
13.            }
14. 
15.            if (!this.columnFiltering.DataControl.FilterDescriptors.Contains(this.compositeFilter))
16.            {
17.                this.columnFiltering.DataControl.FilterDescriptors.Add(this.compositeFilter);
18.            }
19. 
20.            this.IsActive = true;
21. 
22. 
23.        }
 
good day:
I try make custom filteringControl with a listbox...
to filtering I use the code up side but just works with one option... if I select 2 o more, the  items disappear of the grid

what I need to do?
thanks have a nice day.
0
Dimitrina
Telerik team
answered on 25 Feb 2015, 01:56 PM
Hello,

May I ask you to share what the default logical operator of this.compositeFilter is? In case it is AND, please set it to be OR instead.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TreeListView
Asked by
Luis
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Luis
Top achievements
Rank 1
Share this question
or