0

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

}
});

我怎样才能做到这一点?

4

1 回答 1

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>

这是来自 dojo 示例的片段:https ://dojotoolkit.org/reference-guide/1.9/dojox/grid/example_Filtering_data.html

问候

于 2013-09-27T09:09:21.883 回答