With the Q3’13 release, Telerik’s DataGrid control for ASP.NET AJAX  supports the so called CheckList filtering type, similar to the one available in MS Excel. This type of filtering allows users to click on a filter button for a given column and open a dropdown with checkboxes for all possible values that can be included or excluded from the filtered data.
CheckListFiltering screenshot

After applying the filter, the records are filtered by the checked values. If the user reopens the filter menu, they will see the last checked values, like in this screenshot:
CheckList Filtering Screenshot

Sample Setup

The check list with possible values is actually a Telerik ASP.NET ListBox that is bound on the client side. To allow you to configure its settings, we introduced some new properties in RadGrid. Let’s see a  sample markup for setting up such filtering:

In this sample configuration of RadGrid, we have used several important properties in order to make it work:
AllowFilteringByColumn="true" – Turns on the filtering, and shows the filter item of RadGrid.
FilterType="CheckList" – Specifies the filter mode that is used.
CheckListWebServicePath="NorthwindCustomersWcfService.svc" – Points the Web Service path to be used when binding the ListBox inside the filter menu.
FilterCheckListWebServiceMethod="LoadCountries" – Points the Method of the WebService to be used for getting values.

In the Basic Filtering demo of RadGrid you can see this filtering in action.

Next on the Plan

Since we are constantly improving our controls, we have plans for future development in this area. Here are some of next goals:

  • Adding more ways for binding the checklist used for selecting the filter values.
  • Providing a way for configuring a template to be shown in the checklist. For the example above, such template would be the flags for each country.
  • Add ability to show items that are in the current page of the grid automatically in the check list without the need of additional datasource.

Feedback Please

I hope you will enjoy the new functionality. Your feedback is highly appreciated, so if you have any questions or suggestions be welcome to post them in our Feedback Portal.

About the Author

Vasil Raev

is a Software Developer at Telerik's ASP.NET AJAX divisions. He enjoys swimming and riding his bike.  Also knows how to use his programming skills for solving complex math problems.


Related Posts


Comments are disabled in preview mode.