Ext 4.0 Grid 分页栏刷新 传参

    myThis.ArticleStore = Ext.create("Ext.data.Store", {
        pageSize: 20,
        autoLoad: {
            start: 0,
            limit: 20
        },
        remoteSort: true,
        proxy: {
            extraParams: {
                typeStr: '1'
            },
            type: 'ajax',
            url: myThis.url,
            reader: {
                type: 'json',
                root: 'rows',
                totalProperty: 'totalCount'
            }
        },
        fields: myThis.ArticleFields
    });

关键代码

    myThis.ArticleStore.on('beforeload', function () {
        myThis.ArticleStore.proxy.extraParams.operate = Ext.getCmp("myoperate").getValue();
        myThis.ArticleStore.proxy.extraParams.active = Ext.getCmp("myactive").getValue();
        myThis.ArticleStore.proxy.extraParams.searchValue = Ext.getCmp('Articlekey').getValue();
        myThis.ArticleStore.proxy.extraParams.searchField = Ext.getCmp('ArticlekeyType').getValue();
    })
 
 

 

你可能感兴趣的:(grid)