Hi,

I have a LayoutContainer with BorderLayout, and a Content Panel (having Grouping Grid and a Widget (containing two buttons and two date fields)) inside the west panel.
- I dont want to provide the fixed height - width anywhere. Not even the columns (i am only having one column).
- In case there will be scrollbars for grid when height or width is not fitting then the scrollbars should apply to content panel (in which the Grid and custom Widget) reside not to the Grid. In short the scrolling should not be applied to grid it should be applied to its parent.
- If the column content's String is too large then column should re-size automatically.

Right now in below code i don't see scroll in content panel when grid rows incresed and also the column is not automatically getting resized if string is too long.

Code:
Code:
import java.util.ArrayList;

import com.extjs.gxt.ui.client.GXT;
import com.extjs.gxt.ui.client.Style.LayoutRegion;
import com.extjs.gxt.ui.client.Style.Scroll;
import com.extjs.gxt.ui.client.data.BaseModelData;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.util.Theme;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
import com.extjs.gxt.ui.client.widget.grid.Grid;
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
import com.extjs.gxt.ui.client.widget.layout.FitData;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class TabBorders implements EntryPoint {

    private Grid grid;
    
    public void onModuleLoad() {
        GXT.setDefaultTheme(Theme.BLUE, true);
        GXT.hideLoadingPanel("loading");
        TabBorders rf = new TabBorders();
    }

    public TabBorders() {
        LayoutContainer lc = new LayoutContainer();
        lc.setLayout(new BorderLayout());

        ContentPanel north = new ContentPanel();
        ContentPanel west = new ContentPanel();
        ContentPanel center = new ContentPanel();
        ContentPanel east = new ContentPanel();
        ContentPanel south = new ContentPanel();

        BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 200);
        westData.setSplit(true);
        westData.setCollapsible(false);

        buildLogGrid();
        ContentPanel cp = new ContentPanel();
        cp.setLayout(new FitLayout());
        cp.setLayoutOnChange(true);
        cp.setHeading("Results");
        cp.setHeaderVisible(false);
        cp.setBodyBorder(false);
        cp.setScrollMode(Scroll.AUTO);
        cp.add(grid);
        cp.add(new Button("Vipul"));
        west.add(cp);
        
        BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);

        BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 200);
        eastData.setSplit(true);
        eastData.setCollapsible(true);

        BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH,
                100);
        southData.setSplit(true);
        southData.setCollapsible(true);
        southData.setFloatable(true);

        lc.add(west, westData);
        lc.add(center, centerData);
        lc.add(east, eastData);
        //lc.add(south, southData);

        Viewport viewport = new Viewport();
        viewport.setLayout(new FitLayout());
        viewport.add(lc);
        RootPanel.get().add(viewport);
        
        populateData();
    }

    private Grid buildLogGrid() {
        ListStore<BaseModelData> store = new ListStore<BaseModelData>();
        ArrayList<ColumnConfig> columns = new ArrayList<ColumnConfig>();
        ColumnConfig cc = new ColumnConfig();
        cc.setId("col1");
        cc.setHeader("This Is Column 1");
        columns.add(cc);
        ColumnModel cm = new ColumnModel(columns);
        
        grid = new Grid(store, cm);
        grid.setTrackMouseOver(false);
        grid.setAutoHeight(true);
        grid.setAutoExpandColumn("col1");
        grid.setLayoutData(new FitData());
        return grid;
    }
    
    private void populateData() {
        BaseModelData entry = new BaseModelData();
        // populate with data. 
        for(int i=0;i<50;i++)
        {
            entry = new BaseModelData();
            entry.set("col1", "I am running this test cases to check the parent scorlling for grid " + i);
            grid.getStore().add(entry);
        }
    }

}


bug.jpg