PDA

View Full Version : EXT Grid Panel Height and Width Set As 0



omprabhakaran
4 Dec 2013, 3:29 AM
hi,
am new to the ext js, i am creating grid using grid panel, after render the grid panel height and width as 0.
may i know wats wrong with that. My Code

control = new Ext.grid.GridPanel({
hideMode: visibilityMode,
layout: 'fit',
scroll: 'both',
enableLocking: true,
border: false,
id: this.id + "_" + name,
controlId: name,
width: width,
height: (rowHeight * visibleRows) + 15,
rowHeight: rowHeight,
store: gridStore,
viewConfig: {
stripeRows: (isTransparent == "y") ? false : true,
emptyText: ''
},
hidden: (visible == "y" || visible == "") ? false : true,
cls: headerCls, //(headerRequired == "n") ? "x-grid-no-header" : "",
columns: gridColumnModel,
dockedItems:(toolbarreq == "true") ? [_bGridToolBar] : "",
componentCls : (toolbarreq == "true") ? 'grid-bcolor' : "",
portlet: this
});

control.render(spanControl.id);

spanControl.id is the some div tag name.

willigogs
4 Dec 2013, 6:42 AM
Unless you provide more information on how the "width", "rowHeight", and "visibleRows" variables are populated, then it will be very difficult to diagnose.

However, since you have your layout set to "fit", I don't really understand why you need to give your gridpanel the height or width configs anyway?