We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to use CollectionViewAdv ?

I wanted a sortable collection like CollectionViewSource in Silverlight and UWP doesn't have one. I found SF CollectionViewAdv. It has all the right params in the intellisense but the documentation doesn't give any meaningful details.

so I just wrote at best guess:

     dataView = new CollectionViewAdv(data);
     lst.ItemsSource = dataView;

and although the view created ok, on the second statement I got nullRef exception without any idea what happened.

Anyone uses it? whats the correct use? or is there another collection for that?

I need to write something like :

    dataView.SortDescriptions.Add(new SortDescription("SOMEPROP", ListSortDirection.Ascending));

3 Replies

BR Balamurugan Rajaraman Syncfusion Team April 25, 2017 05:30 PM UTC

Hi Volodymyr, 

Thank you for contact Syncfusion support. 

We are having Syncfusion.data.uwp for doing data operations needed for SfDataGrid. You can use it in your application if it suits your needs. As this is internal view of SfDataGrid, you can’t find the documentation for the same. Please find the getting started code snippet for doing sorting and grouping using QueryableCollection. 

QueryableCollectionView view = new QueryableCollectionView(viewM.Orders); 
             
view.SortDescriptions.Add(new SortDescription() { PropertyName = "OrderID", Direction= ListSortDirection.Descending }); 
 
view.GroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "OrderID" }); 
 
view.Filter = FilterRecord; 
 
//Get the ordered information when grouping not applied 
view.Records 
 
//Get the ordered information when grouping applied 
view.TopLevelGroup.DisplayElements 
 
//Get the groups list when 
view.TopLevelGroup.Groups 


We have attached the example application for you reference. You can able to download it from the below link. 


Regards, 
Balamurugan R 



MA maxima April 25, 2017 06:11 PM UTC

wow you guys are exceptional help! :) I don't remember any software support to be that helpful :) and I am really hard to please :) I should write a review somewhere.. let me know if you have particular websites in mind ;)

thanks!


EB Elizabeth Britton Syncfusion Team May 2, 2017 12:44 PM UTC

Hello Maxima,

Thank you so much for your kind reply! We have a few options where you can write a review: Visual Studio, Stack Overflow, or Facebook are all excellent choices.

Is it possible for you to provide your full name and company to associate and quote you on our website with the complimentary statement you made?

Thank you,
Elizabeth Britton
elizabethb@syncfusion.com

Loader.
Live Chat Icon For mobile
Up arrow icon