PDA

View Full Version : Tab, Grid Toolbar



funfan34
11 May 2009, 2:40 AM
I have a page with grid, and this grids has a pagination toolbar, and it's displaying fine (the toolbar stick with the grid), however if my page is using tab, in this tab, it has a grid that own a pagination toolbar, the rows displayed correctly in the grid BUT the toolbar is not sticking with the Grid. Instead the toolbar is located at the bottom of the grid. Please help to fix this. It happens only when I use grid in tabs.:

normal behaviour (grid) in a page :
----------------
l--------------->>>Gpagination toolbar is here
l row data...
l----------------bottom

Problem :
----------------
l---------------
l row data...
l----------------bottom>>>pagination toolbar is here instead of the top part

please help ! thanks!

Animal
11 May 2009, 2:44 AM
Probably overnesting. But you of course give us NO information to help us, so I'm relying on my trusty crystal ball.

I see a vision that you put your GridPanel inside a wrapping Panel, and add that wrapping Panel to the TabPanel.

funfan34
11 May 2009, 11:06 PM
Thanks for your quick reply. It seems that you are write. I have a FormPanel that wrapps the Tab Panel which wraps the grid . Please take a look at my code



projectForm = ....FormPanel({
...
});

var subTabs = new Ext.TabPanel({

id:'correspondencePanel',
items: [{
title: 'Problemactic Tab',
listeners: {activate: internalTab}
} ]
});

projectForm.add(subTabs);

----------------------------------------
function internalTab(internalTabItems){

var internalCorresGrid = loadInternalCorresGrid();
internalTabItems.add(internalCorresGrid);
internalTabItems.ownerCt.doLayout();

}
-------------------------------------------------------------
function loadInternalCorresGrid() {
...

var internalCorresGrid = new Pavo.GridPanel ({
store: ds,
id:'internalCorresGrid',
...
....
tbar: ..PagingToolbar ({
pageSize: 5,
store: ds
})
});

return internalCorresGrid;
---------------------------------------------------------------

}

How can I fix it?

Animal
11 May 2009, 11:23 PM
Read the docs.

Also, I explained it was overnested.

You put a GridPanel inside another Panel

Why just put a Panel in a Panel? all you get is that wrapping Panel not diong any sizing on the inner Panel. As fully described in the API docs!