【问题标题】:how to call enhancedGrid filter plugin from a function..in dojo如何从函数中调用增强网格过滤器插件..in dojo
【发布时间】:2013-09-25 10:05:33
【问题描述】:

我必须从函数中调用 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();

}
});

我怎样才能做到这一点?

【问题讨论】:

  • 但需要这样请帮助 例如:var buttonfilter=function(){ buttonfilter.onClick(){ filter();// 我必须调用一个过滤器

标签: json dojo dojox.grid.datagrid dojox.grid


【解决方案1】:

你可以这样做:

<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>

这是来自道场的 sn-p 示例:https://dojotoolkit.org/reference-guide/1.9/dojox/grid/example_Filtering_data.html

问候

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-04-04
    • 1970-01-01
    • 2015-02-26
    • 2013-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-03
    相关资源
    最近更新 更多