kendo网格自定义过滤器[介于]之间 [英] kendo grid custom Filter [Is between]
本文介绍了kendo网格自定义过滤器[介于]之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我为kendo网格添加了一个自定义过滤器,我已经禁用了额外的要求,只添加了And 。
问题
过滤我的过滤数据。再次清理和过滤后我没有得到结果
这是我的代码
Hi All,
Am adding a custom filter to kendo grid where i have disabled extra requirements and added only "And" .
Problems
Am filtering am getting the filtered data.After clearing and filtering again am not getting the result
Here is my code
_grid.bind("filterMenuInit", function (e) {
var filed = e.field;
if (e.field == "BirthDate") {
e.container.find("div.k-filter-help-text").text("Is beetween");
var endOperator = e.container.find("[data-role=dropdownlist]:eq(2)").data("kendoDropDownList");
endOperator.value("lte");
endOperator.trigger("change");
var logicOperator = e.container.find("[data-role=dropdownlist]:eq(1)").data("kendoDropDownList");
logicOperator.readonly();
var beginOperator = e.container.find("[data-role=dropdownlist]:eq(0)").data("kendoDropDownList");
beginOperator.value("gte");
beginOperator.trigger("change");
e.container.find("span.k-dropdown:first").css("display", "none");
e.container.find("span.k-dropdown:last").css("display", "none");
$("form.k-filter-menu button[type='reset']").trigger("click");
}
else
{
//alert(2);
}
});
推荐答案
( form.k-filter-menu button [type ='reset'])。触发器( 点击);
}
else
{
// alert(2);
}
});
("form.k-filter-menu button[type='reset']").trigger("click"); } else { //alert(2); } });
function grid_filterMenuInit(e){
e.container.getKendoPopup()。bind(open,function(evt){
if(e.field ==DateOfItemPurchase){
var firstValueDropDown = e.container.find(select:eq(0))。data(kendoDropDownList);
firstValueDropDown.value(gte);
firstValueDropDown.trigger(change);
firstValueDropDown.readonly();
var logicOperator = e.container.find([data-role = dropdownlist]:eq(1))。data(kendoDropDownList);
logicOperator .readonly();
var secondValueDropDown = e.container.find(select:eq(2))。data(kendoDropDownList);
secondValueDropDown.value (lte);
secondValueDropDown.trigger(更改);
secondValueDropDown.readonly();
e.container.find(span.k-dropdown:first)。css(display,none);
e.container.find(span.k-下拉列表:最后)。css(display,none);
}
});
}
grid =
function grid_filterMenuInit(e) {
e.container.getKendoPopup().bind("open", function (evt) {
if (e.field == "DateOfItemPurchase") {
var firstValueDropDown = e.container.find("select:eq(0)").data("kendoDropDownList");
firstValueDropDown.value("gte");
firstValueDropDown.trigger("change");
firstValueDropDown.readonly();
var logicOperator = e.container.find("[data-role=dropdownlist]:eq(1)").data("kendoDropDownList");
logicOperator.readonly();
var secondValueDropDown = e.container.find("select:eq(2)").data("kendoDropDownList");
secondValueDropDown.value("lte");
secondValueDropDown.trigger("change");
secondValueDropDown.readonly();
e.container.find("span.k-dropdown:first").css("display", "none");
e.container.find("span.k-dropdown:last").css("display", "none");
}
});
}
grid =
(#grid)。data(kendoGrid);
grid.bind(filterMenuInit,grid_filterMenuInit);
("#grid").data("kendoGrid");
grid.bind("filterMenuInit", grid_filterMenuInit);
这篇关于kendo网格自定义过滤器[介于]之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文