Grid Filter Multi Checkboxes

2 posts, 0 answers
  1. Barry
    Barry avatar
    6 posts
    Member since:
    Nov 2014

    Posted 26 Mar 2015 Link to this post

    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
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 27 Mar 2015 Link to this post

    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.

     
Back to Top