This is a migrated thread and some comments may be shown as answers.

Grid Filter Multi Checkboxes

1 Answer 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Barry
Top achievements
Rank 1
Barry asked on 26 Mar 2015, 09:12 AM
I am looking at the new filtering feature of the grid - Multi Checkboxes (http://demos.telerik.com/aspnet-mvc/grid/filter-multi-checkboxes)

I can't work out how I can dynamically change the filter list based on the contents of the grid.

I currently have a drop down list in the toolbar of the grid, that users can select various pre-defined filtered datasets. I'd like the checkbox list in the filter menu to only display the available values in the grid. I don't mind doing this via an AJAX call and manually populating the data but I can't work out to get a reference to the filter menu. (I will have multiple filter menus on the grid)

Any pointers?

Thanks

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 27 Mar 2015, 01:12 PM
Hello Barry,

You need to provide your own dataSource that the MultiCheck filtering will use to render the checkboxes. Check the example in the docs here:

http://dojo.telerik.com/

If you want use can access the current dataSource and set its data dynamically like this:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-data

$("#grid").data("kendoGrid").thead.find("th:eq(0)").data("kendoFilterMultiCheck").checkSource.data([{ country: "UK"}])


Kind Regards,
Petur Subev
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Grid
Asked by
Barry
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or