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

 
posted @ 2012-01-06 09:44  孙金棚  阅读(1885)  评论(1编辑  收藏  举报