我必须从函数调用EnhancedGrid过滤器插件,但在EnhancedGrid中,必须声明过滤器插件才能使用过滤器。
grid = new EnhancedGrid({
id : 'grid',
store : yourStore,
structure : layout,
rowSelector : '20px',
plugins : {
search : true,
pagination : {
pageSizes : [ "50", "100"],
description : true,
sizeSwitch : true,
pageStepper : true,
gotoButton : true,
maxPageStep : 2,
position : "bottom"
},
filter : {
closeFilterbarButton : true,
ruleCount : 2
itemsName : "rows"
}
}
});
grid.placeAt("myGrid");
grid.startup();
}
});
我怎样才能做到这一点?
答案 0 :(得分:0)
你可以这样做:
<div data-dojo-type="dijit.form.Button">
filter movies with the letter "T" at the beginn
<script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
// Filter the movies from the data store:
grid3.filter({Title: "T*"});
</script>
这是来自道场的一个片段示例:https://dojotoolkit.org/reference-guide/1.9/dojox/grid/example_Filtering_data.html
此致