0
votes

I am New to extjs,I am working extjs3.2 on grid filter.Filter is showing correctly under each header,But its not Filterning

var store = new Ext.data.Store({
                    id : 'user',
                    autoDestroy: true,
                    url: 'site/view.action',
                    proxy : proxy,
                    reader : reader,
                    writer : writer, // <-- plug a DataWriter into the store
                                        // just as you would a Reader
                    autoSave : false,


                // <-- false would delay executing create, update, destroy
                // requests until specifically told to do so with some [save]
                // buton.
                });

Here is my code for GridFilter

 var filters = new Ext.ux.grid.GridFilters({
                     encode: true, // json encode the filter query
                     local: false,
                    filters:[
                 {type: 'string',  dataIndex: 'sapid'},
                 {type: 'numeric', dataIndex: 'orgid'},
                 {type: 'string',  dataIndex: 'companyCode'}

                             ]});

Here is my code for GridPanel

 var grid = new Ext.grid.GridPanel({
                        store : store,
                        disableSelection: true,
                        id : "documentsGrid",
                        columns : [{
                                    header : "SAP ID",
                                    width : 120,
                                    sortable : true,
                                    dataIndex : 'sapid',
                                    filter: {
                                        //type: 'numeric'  // specify type here or in store fields config
                                    },
                                    filterable: true,
                                    renderer: function (value, metaData, record, rowIndex, colIndex, store) {
                                         return  getToolTip(value, metaData, record, rowIndex, colIndex, store);
                                    },
                                    editor : {
                                        xtype : 'textfield',
                                        allowBlank : true
                                    }
                                    },
     plugins: [editor,filters],

What is wrong i cant able to understand

Please Help

Thanks

1

1 Answers

0
votes

Since you specified that the filter is not local so that means that you must have server-side filtering. If you want to filter on the client side only then specify local : true.

Also make sure that the dataIndex used in the filter does reference a field in your store and that nothing is missing.