groupds = new Ext.data.GroupingStore({
                proxy: new Ext.data.HttpProxy({
                    url: '../colligate/GetData.aspx?dataName=warehouse'
                }),
                reader: new Ext.data.JsonReader({
                    root: 'Rows',
                    totalProperty: 'totalProperty'
                }, waRecore),
                id: 'waReader'
            });
            groupds.load();要怎么动态添加 GroupingStore 的数据源地址
比如groupds.url=‘’这个方法不行,
有人说用baseParams,但是这个不懂用?请高手指教PS:我要实现的功能就是点击某个按钮,能显示对应的数据。
所以要重新设置数据来源。

解决方案 »

  1.   

    通过传参数不是更好吗?为什么要更改url呢、?
      

  2.   

    试试这样子行不行,这个我做的,是可以的
    this.store = new Ext.data.GroupingStore
    ({
    autoDestroy: true,
    url : Ext.qwareinfo.oa.pubinfo.notice.manage.g_mainurl,
    baseParams : {actionName : 'getNoticePP'}, 
    reader: new Ext.data.JsonReader
     ({ 
                 root: 'data',
         totalProperty: 'totalCount',      
         idProperty: 'ID',   //具体设置原因待查
                 fields:['ID', 'TYPE', 'TITLE','LVL', 'LVLNAME','PUBLISHTIME','PUBLISHORG', 'ISREADED','HASATTCH','PUBTIME']
     }),
     remoteSort: true,           //是否从后台排序
     autoLoad : false,
     groupField: 'PUBTIME' 
    });