Ext-grid-Filterung Standard-filter-Aktivierung von be -

Habe ich Hinzugefügt, Standard remote-filter-Gitter für die Spalte 'hiddenFlag', aber es wird nicht aktiv auf den ersten laden. Wenn ich klicken Sie auf die Spaltenüberschrift im Menü filter aktiv zu sein scheinen aber records ist jetzt angebracht. Sollte ich deaktivieren und aktivieren Sie es erneut.

Ext-grid-Filterung Standard-filter-Aktivierung von be -

wie kann ich es konfigurieren, um aktiv zu sein für das erste laden auch?

Ext.define('Ext.migration.CommentGrid', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.commentgrid',            
    xtype: 'grid',
    initComponent: function(){
        filePath = "";
        this.filters = {
                ftype: 'filters',
                encode: false, //json encode the filter query
                local: false, //only filter locally
                filters: [{
                    type: 'numeric',
                    dataIndex: 'id'
                }, {
                    type: 'boolean',
                    dataIndex: 'publishableFlag'
                }, {
                    type: 'boolean',
                    dataIndex: 'hiddenFlag',
                    value:0,
                    active:true
                }
                ]
            };        
        Ext.apply(this, {
            iconCls: 'icon-grid',
            features: [this.filters],
            selType: 'rowmodel',
            columns: [
                {
                    text: 'ID',
                    hideable: false,
                    dataIndex: 'id'
                },
                {
                    xtype: 'checkcolumn', 
                    text: 'Yayınlandı mı?',
                    dataIndex: 'publishableFlag'
                },
                {
                    xtype: 'checkcolumn', 
                    text: 'Gizle',
                    dataIndex: 'hiddenFlag',
                    filter: {
                        value:0,
                        active:true
                    }
                }
            ]
        });
        this.callParent();
    },
    listeners:{
        'afterrender': function(a,b,c){
            //Ext.getCmp()
            console.log("after render", this);

        }
    },
    bbar: Ext.create('Ext.PagingToolbar', {
        store: commentStore,
        displayInfo: true
    })
});
InformationsquelleAutor efirat | 2013-02-18
Schreibe einen Kommentar