简体   繁体   中英

disable kendo-ui grid multi column filtering

How to disable kendo-ui grid multi column filtering? I need to clear other column filter value when filtering with a column, and filtering only possible with single column(Not combination filter)?

try this:

var datasource = $("#grid").kendoGrid({
    columns: [{}],
    filterable : true,
    filterMenuInit: function(e) {
        $("form.k-filter-menu button[type='reset']").trigger("click");
    },
    dataSource: {
        data: [{}]
    }
});

NOTE: after some research i noticed that this is a common issue in the kendo community as well as is one of the most wanted feature to bind the filter menu event , but still there is no valid fix. so, i decided to hack the source code a little bit (just few lines of code), this task has been quite annoying since the kendo source is only available in compressed/obfuscated format for non licensed copy, BTW, you can see the result on the demo page and look into the source code. source on github for direct cdn file inclusion hope this help someone...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM