Grid Multi filtering not working, only shows as text box

4 posts, 0 answers
  1. Brianna
    Brianna avatar
    5 posts
    Member since:
    Sep 2017

    Posted 03 Apr 2018 Link to this post

    I'm attempting to set the filter on some of my columns to Multi, just like the demo at https://demos.telerik.com/aspnet-mvc/grid/filter-multi-checkboxes shows.

    I have tried it with and without an ItemTemplate, with and without Search, with and without a BindTo, and just about anything else I can think of.  The filter only ever shows a text box with the button opening a dropdown for equals/contains/starts with/etc, never the checkboxes expected. 

    I'm using version 2017.3.1026.

    Why does this not work like the demo?

    @{Html.Kendo().Grid<PersonGridViewModel>()
        .Name("Grid2")
        .Columns(c =>
        {
            c.Bound(e => e.Race)     .Width(275).Filterable(f => f.Multi(true).Search(true));
            c.Bound(e => e.Ethnicity).Width(225).Filterable(f => f.Multi(true));
            // other columns
        }
        .Filterable(f => f.Mode(GridFilterMode.Row))
        .DataSource(d => d
            .Ajax()
            .ServerOperation(false)
            .Model(m => m.Id(r => r.ID))
            .Read(r => r.Action("action", "controller"))      // Actual names replaced with placeholder
        )
        .Render();
    }
  2. Stefan
    Admin
    Stefan avatar
    2913 posts

    Posted 05 Apr 2018 Link to this post

    Hello, Brianna,

    Thank you for the provided code.

    The issue occurs because the filter mode is set to "row" which is not compatible with the MultiCheck filter menu.

    .Filterable(f => f.Mode(GridFilterMode.Row))

    Please revert to the default filter mode in order to use the MultiCheck filter:

    .Filterable()

    I hope this is helpful.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Brianna
    Brianna avatar
    5 posts
    Member since:
    Sep 2017

    Posted 05 Apr 2018 in reply to Stefan Link to this post

    I don't see that anywhere in the documentation.  Did I miss it somewhere?

    Is there a plan to change this or a work-around for it, because I'd prefer to use the row filtering in this case for other reasons, but still need to have the ability to filter for multiple items.

  4. Stefan
    Admin
    Stefan avatar
    2913 posts

    Posted 06 Apr 2018 Link to this post

    Hello, Brianna,

    The main reason is that these are different filtering modes and they cannot be mixed auto of the box in order to void side effects.

    I can suggest checking the following article demonstrating how this could be achieved using additional logic:

    https://docs.telerik.com/kendo-ui/knowledge-base/filter-multi-check-row-filter

    I hope this workaround to be helpful.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top