我正在使用kendo UI网格视图。
数据是
subNodesArray = "one", "two", "three", "four", "five", "[15] OTU2-XP(59.79)(55.75) -B", "[16] GE-XPE(57.36)(*)-B*"]
var grids = $('#alarmsGrid').data('kendoGrid');
for(var i=0; i<subNodesArray.length;i++){
console.log(subNodesArray[i])
grids.dataSource.filter({
"logic":"or",
"filters":[
{ field: "sourceId", operator: "eq", value: subNodesArray[i] },
]
});
}
此处过滤对我不起作用。
答案 0 :(得分:0)
var subNodesArray = ["one", "two", "three", "four", "five", "[15] OTU2-XP(59.79)(55.75) -B", "[16] GE-XPE(57.36)(*)-B*"];
var filters = [];
for(var i=0; i<subNodesArray.length;i++){
filters.push({ field: "sourceId", operator: "eq", value: subNodesArray[i] });
}
$('#alarmsGrid').data('kendoGrid').dataSource.filter({
"logic":"or",
"filters":filters
});