Hello,
I have a grid with the filterMenuInit event set up to fire a custom function. However, the event is not firing when I open the filter menu. Here is some of the code for the grid:
@(Html.Kendo().Grid(Model)
.Name("Grid")
.ColumnMenu()
.Columns(columns =>
{
columns.Bound(m => m.Number)
.Title("Number")
.Width(140)
.Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(true).Template("NumberFilter")));
columns.Bound(m => m.FirstName)
.Title("First Name")
.Width(140)
.Filterable(ftb => ftb.Cell(cell => cell.Delay(@serverSideDelay).ShowOperators(true)));
columns.Bound(m => m.LastName)
.Title("Last Name")
.Width(140)
.Filterable(ftb => ftb.Cell(cell => cell.Delay(@serverSideDelay).ShowOperators(true));
})
.Pageable(pageable => pageable
.Refresh(true)
.ButtonCount(10))
.ColumnMenu(menu =>
{
menu.Filterable(false);
menu.Columns(false);
})
.Sortable(s => s
.AllowUnsort(false)
.SortMode(GridSortMode.SingleColumn))
.Selectable()
.EnableCustomBinding(true)
.Events(e => e.FilterMenuInit("hideFilter"))
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(m => m.ID))
.Sort(s =>
{
s.Add("LastName").Ascending();
})
.PageSize(10)
.ServerOperation((bool)@ViewBag.IsServerSide)
.Read(read => read.Action("ReadAction"))
.Total((int)ViewBag.Count)
.Events(events => events.Error("onKendoDataSourceError").RequestStart("checkFilter"))
)
.Events(e => e.Change("selectObject").DataBound("checkFilter"))
)
I'm using version 2014.3.1316. Can you please help with this? Thanks.