PDA

View Full Version : Get grid from ActiveTab()



consolex
19 Aug 2009, 5:49 AM
Hi,

i am wondering how to get a grid Object which is inside an tab.

var mytab = tabs.getActiveTab();

mytab.getXXX ....


thx for helping

Animal
19 Aug 2009, 5:54 AM
I hear alarm bells.

Let's sort things out first.

Are you sure the Grid has to be inside a tab? Or could jut just be a tab?

Show some context. Screenshots, code...

consolex
19 Aug 2009, 6:07 AM
tabs = new Ext.TabPanel({....});
grid = new Ext.grid.EditorGridPanel({.....});

tabs.add(grid);.....

via
tabs.getActiveTab().getStore().insert(....

i get the store and can assign values to the grid


Now i need the grids selection model to get the selected line to delete it! So i need the grid to get its selection model i think.

Animal
19 Aug 2009, 6:08 AM
Right. It's just getActiveTab then.

consolex
19 Aug 2009, 6:12 AM
thx for pointing me to the right direction ...
i already had the grid via

tabs.getActiveTab() :">

so

tabs.getActiveTab().getSelectionModel() worked :)


thank you so much!!! =D>