问题
I have a kendo grid which has a kendo filter, I have set extra(false) in the kendo filter and removed the dropdown using the below code. Here the filtering is happening only when I give complete value, instead I need to filter with starting value
---------------------------script start
<script type="text/javascript">
function filterMenuInit(e) {
var firstValueDropDown = e.container.find("select:eq(0)").data("kendoDropDownList");
setTimeout(function () {
firstValueDropDown.wrapper.hide();
});
}
</script>
------------------------script End
@(Html.Kendo().Grid(Model) //Bind the grid to ViewBag.Products
.Name("grid")
.Columns(columns =>
{
columns.Bound(Commission => Commission.CreatedDate).Format("{0:MM/dd/yyyy hh:mm tt}").Filterable(f => f.UI("DateTimeFilter"));
columns.Bound(Commission => Commission.Status);
columns.Bound(Commission => Commission.Branch);
columns.Bound(Commission => Commission.ULN);
columns.Bound(Commission => Commission.MgrAmount);
columns.Bound(Commission => Commission.PayFrequency);
columns.Bound(Commission => Commission.CalcBasis);
})
.Pageable() // Enable paging
.Sortable() // Enable sorting
.Filterable(f => f.Extra(false))
.Events(e => e.FilterMenuInit("filterMenuInit"))
.Pageable(pager => pager
.PageSizes(new[] { 5, 10, 15 }))
)
来源:https://stackoverflow.com/questions/20214570/kendo-mvc-filter