In my previous post I explained the basic usage of the RadJumpList control and how to display the data by using declarative sort and group descriptors. Now in part two you will see how to give your users the ability to modify the sorting, grouping and filtering on the fly. There is no out of the box UI for these data operations provided in this version of the control. We are still not sure what will be the preferred way of implementing this from a UX perspective and how to align it with the Metro guidelines. So for the moment we have implemented the needed public APIs and it will be super-easy for you to tie any UI to the exposed functionality. Actually the example below is just that - we have a predefined list of columns that you can sort, predefined filters and predefined columns on which you can group the data.
Lets first start with the Sorting. Here is how the code for dynamic sorting looks like:
As you can see there are 3 steps involved:
Now lets see how the filtering works. For filtering we should use the GenericFilterDescriptor class and pass a Predicate that will be used for filtering the data. Here is how the sample code looks like:
The grouping syntax is very similar to the sorting syntax, the only difference is that we are populating the GroupDescriptors collection of RadJumpList. Here is the sample code - really straightforward:
So there you have it - a super easy and straighforward way to enable the 3 most common operations that are used on any data. Please download the sample project and let us know if you have any feedback. We are especially interested in your thoughts and feedback on the UI and how you think we should implement it out of the box for our controls.
Read on - part 3 of the series is now published - performance of the Jump List with large data.
Valentin Stoychev (@ValioStoychev) for long has been part of Telerik and worked on almost every UI suite that came out of Telerik. Valio now works as a Product Manager and strives to make every customer a successful customer.
Subscribe to be the first to get our expert-written articles and tutorials for developers!