View Full Version : problem between layout manager Table and Grid Panel

24 May 2011, 3:09 AM

is there any problem between the layout manager Table and Grid Panel specially scroll ?

thank you for the help

24 May 2011, 3:41 AM
A table layout makes no guarantees about the height/width of content in its cells. In short, if you give your grid a fixed height, you should see scrollbars.

24 May 2011, 4:05 AM

thank you for the reply, actually when i write autoHeight i get a normal grid panel with informations but without scroll 26227 but when i specify the height i get this : 26226

my gridPanel is in a panel with table layout manager, wich is in a viewPort. i'm using FireFox 3.6.17.

this is the code:

var hopitaux_Grid = new Ext.grid.GridPanel
title: 'Basic Grid Panel with Ext JS and PHP',
height: 250,
autoScroll: true,
frame: true,
store: store_hopitaux,
colModel: new Ext.grid.ColumnModel({

columns: [
{header: 'nom_hopital', dataIndex: 'nom_hopital', id: 'nom_hopital'},
{header: 'statut_hopital', dataIndex: 'statut_hopital'},
{header: 'niveau_hopital', dataIndex: 'niveau_hopital'},
{header: 'nbr_consult_total', dataIndex: 'nbr_consult_total'}

dashBoardPanel = new Ext.Panel
id: 'main-panel',
region: 'center',
border: true,
autoScroll: true,
layout: {
type: 'table',
columns: 2
defaults: { height: 285 },
items:[mapPanelDashBoard, hopitaux_Grid]


24 May 2011, 6:11 AM
Comment out "defaults: { height: 285 }" in the dashBoardPanel and your grid will scroll.

24 May 2011, 6:30 AM
Thank you very much, it works now