PDA

View Full Version : How to make a grid NOT to use ScrollBars inside a nestedlayout?



memph
27 Jul 2007, 8:00 AM
Hi,

I've got the following problem: I've got a TreeView (on the left) and a Grid (on the right) next to eachother and a NestedLayout, and their purpose to make 'compound' TreeView so the Grid's lines are extensions for the appropriate TreeView nodes. This requires the contents of the TreeView and the Grid to be in sync.
To achieve that I have to disable all possible scrollbars for the TreeView and the Grid and have nesting layout element show a common scrollbar for them, if needed.
I almost managed to reach this goal, the nesting layout shows the scrollbar if needed.
However, the Grid shows it's own (vertical) scrollbar as well and it actually needs that scrollbar since the Grid's size is smaller than what the data to be shown requires. The TreeView has the some problem without even scrollbar.

WHAT I NEED TO KNOW: is there some constraint set by the nestedlayout / grid / treeview which limits the area that the nested elements can use? As I told I want to grid / tree to use as much (virtual) display area they want, and the layout element would show scrollbar if it's more than the actual size of the layout.

Here goes my code (hint: the fitToFrame tags are just desperate tries...):

[code]
pathgrid = new Ext.grid.Grid("path-content", {
ds: pathgridDs,
cm: cm,
autoScroll: false,
fitToFrame: false
});

pathgrid.render();

...

var innerlayout = new Ext.BorderLayout('path-tab', {
west: {
titlebar: true,
title: '