Kendo Grid columnMenuInit and Filter Operator Restore Not Firing After Sort

0 Answers 2 Views
Grid
Isis
Top achievements
Rank 1
Isis asked on 20 Aug 2025, 02:15 PM

Hi,

I’m using the Kendo UI Grid with column menu filters. My requirement:

  • Let the user pick a filter operator (e.g., contains, equals).

  • Don’t apply a filter if the value is empty.

  • Keep the operator visible every time the 3-dot menu opens, even after sorting.

What I’ve tried:

  1. columnMenuInit → Works first time, but doesn’t fire again for the same column.

  2. Popup open inside columnMenuInit → Fires once, but after sorting the grid, it doesn’t trigger again.

  3. Delegated jQuery click handler → Works reliably, but feels like a hack.

Minimal repro (MVC wrapper):

@(Html.Kendo().Grid<MyModel>() .Name("Invoices") .Columns(c => { c.Bound(x => x.InvoiceNumber); c.Bound(x => x.CustomerName); }) .Sortable() .Filterable(f => f.Extra(false)) .ColumnMenu(m => m.Filterable(true)) .Events(e => e.ColumnMenuInit("onColumnMenuInit")) ) <script> function onColumnMenuInit(e) { var popup = e.container.data("kendoPopup"); if (popup) { popup.bind("open", function () { var ddl = e.container.find("select[title='Operator']").data("kendoDropDownList"); if (ddl) ddl.value("contains"); // operator only, no value e.container.find("input[type=text]").val(""); }); } } </script>

Issue:

  • The operator shows correctly the first time.

  • After sorting and reopening the menu, the operator reset logic does not run.

Questions:

  • Is there an official event I can use to run logic every time the column menu opens?

  • What’s the recommended way to restore operator state when no filter value is applied?

Thanks!

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Isis
Top achievements
Rank 1
Share this question
or