PDA

View Full Version : Two grid with the same Store with no reflection - how can do this?



Forn
23 May 2012, 12:15 PM
Hello.

I have the two tabs with grid on each one.
The grid is configuring: store: 'As.DSOperationSystemVersion'.

And in separated file i have: Ext.define('Etersoft.Korinf.WebUI.model.ModelOperationSystemVersion'.

What i must do that the change in tab 1 don't reflect grid in the tab 2.


ExtJs version 4.1

vietits
23 May 2012, 5:20 PM
You should use two instances of store for your grids.

Forn
27 May 2012, 7:38 PM
Ok.
I usre the next code:


tabPanelData.add({
id: tabId,
title: selectedText,
xtype: 'tabOperationSystemItem',
closable: true
}).show();

var storeObject = new Etersoft.Korinf.WebUI.store.DSOperationSystemVersion();
Ext.getCmp(tabId).getComponent('gridOperationSystemItemVersionList').store = storeObject;


But when i invoke this code on the button click:


grid.editingPlugin.startEdit(0, 0);


I get the next error:


context is undefined
http://www.aaa.ru/extjs/ext-all-debug.js
Line 88583

error source line: ...false || me.fireEvent('beforeedit', me, context) === false || context.cancel || ...

Forn
27 May 2012, 7:56 PM
Fixed with:


storeObject = new Etersoft.Korinf.WebUI.store.DSOperationSystemVersion();
Ext.getCmp(tabId).getComponent('gridOperationSystemItemVersionList').reconfigure(storeObject);