extjs4.2:点击第一个grid切换第二个grid的store
onGridpanelSelect: function(selModel, record, index, options) { var sTblEn = record.get('TABLE_NAME_EN'); sTblEn = sTblEn.toLowerCase(); var grid_t = Ext.getCmp('griddata'); var store_t = Ext.data.StoreMgr.lookup('store_' + sTblEn); grid_t.store = store_t; grid_t.bindStore(store_t); }
另一种思路,切换store的url:
onGridpanelSelect: function(selModel, record, index, options) { var sTblEn = record.get('TABLE_NAME_EN'); sTblEn = sTblEn.toLowerCase(); var storeDzm = Ext.data.StoreMgr.lookup('StoreData'); storeDzm.getProxy().url = '/t0412/wm_qry/t_content?t_name=' + sTblEn; storeDzm.load(); }