FilterDescriptors for Nested Children

1 posts, 0 answers
  1. Ubuntu
    Ubuntu avatar
    89 posts
    Member since:
    Jul 2012

    Posted 08 Oct 2011 Link to this post

    Dear all,

    Using MVVM:
    ==========
    I defined QDSCV to hold data collection bounded to RadTreeView.
    I implemented the Filter to TreeView using the QDSCV and it works only on the top level items, have a look at the implementation below
    if (string.IsNullOrEmpty(args.NewValue.ToString()))
                {
                    GroupItems.FilterDescriptors.Clear();
                    GroupItems.AutoLoad = true;
                }
                else
                {
      
                    GroupItems.AutoLoad = false;
                    GroupItems.FilterDescriptors.Clear();
      
                    FilterDescriptor filterDescriptor = new FilterDescriptor("group_name_1",FilterOperator.Contains, args.NewValue.ToString());
                    GroupItems.FilterDescriptors.Add(filterDescriptor);
      
                    GroupItems.AutoLoad = true;
                      
      
                }

    I then needed to filter the treeview based on Children values, how can I do this using the previous scenario.and more how can I go to the bottom of the data hierarchy doing such search/filtering

    IF I only be able to cast/cast back the QDSCV ... I would have achieved this more easily, let me elaborate more ...
    GroupItems =
    (QueryableDomainServiceCollectionView<group>)
    _groupItemsOriginal.Where(l => l.group_name_1.StartsWith(args.NewValue.ToString())).AsQueryable();
    I could have defined a "groupItemsOriginal" to hold the original data from the server and then do the manipulation as in the code above then cast it back to QDSCV, but this isn't possible by any mean ..!!

    I am really frustrated about the QDSCV, as much as easily to gives to databinding and observation as much ridged when dealing with specific details that can really be very important.

    I hope anyone can give an answer to my issue or a workaround.

    regards

Back to Top