filtering parents and childrens

4 posts, 0 answers
  1. Luis
    Luis avatar
    29 posts
    Member since:
    Dec 2013

    Posted 10 Feb 2015 Link to this post

    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?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 11 Feb 2015 Link to this post

    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.

     
  3. DevCraft banner
  4. Luis
    Luis avatar
    29 posts
    Member since:
    Dec 2013

    Posted 24 Feb 2015 Link to this post

    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.
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 25 Feb 2015 Link to this post

    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.

     
Back to Top