Question

I have to call the EnhancedGrid filter plugin from a function, but in EnhancedGrid the filter plugin has to be declare in order to work with filter.

    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();

}
});

How can I achieve this?

Was it helpful?

Solution

You can do it this way:

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

It's a snippet from a dojo Example : https://dojotoolkit.org/reference-guide/1.9/dojox/grid/example_Filtering_data.html

Regards

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top