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

Grid Multi filtering not working, only shows as text box

3 Answers 218 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brianna
Top achievements
Rank 1
Brianna asked on 03 Apr 2018, 07:35 PM

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();
}

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 05 Apr 2018, 06:29 AM
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.
0
Brianna
Top achievements
Rank 1
answered on 05 Apr 2018, 02:47 PM

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.

0
Stefan
Telerik team
answered on 06 Apr 2018, 07:29 AM
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.
Tags
Grid
Asked by
Brianna
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Brianna
Top achievements
Rank 1
Share this question
or