View Full Version : EXTJS 4.1 : grid data is not shown properly if used in Ext.window.Window

8 May 2012, 7:15 AM
If datagrid is useddirectly in browser window the grid data is shown properly.
But if grid is rendered inside Ext.window.Window, grid data is not shown. Only header is seen.
This was working fine in 4.0.7.
If position:absolute is removed from the table tag style property , everything works fine. 4.0.7 do not have this property.

<div id="gridpanel-1390-body" class="x-panel-body x-grid-body x-panel-body-default x-panel-body-default x-layout-fit" style="left: 0px; top: 23px; width: 511px; height: 23px;">
<div id="gridview-1393" class="x-grid-view x-fit-item x-grid-view-default x-unselectable" style="overflow: auto; position: relative; -moz-user-select: -moz-none; margin: 0pt; width: 509px;" tabindex="-1">
<div id="ext-gen1737" style="position: absolute; width: 1px; height: 0px; top: 0pt; left: 0pt;"></div>
<table class="x-grid-table x-grid-table-resizer" cellspacing="0" cellpadding="0" border="0" style="width: 509px; position: absolute;">
<tr class="x-grid-header-row">

8 May 2012, 12:05 PM
Please post your code in the future so we can help. See if this will work for you:

Also make sure you are using 4.1 final.

Ext.define('MyWindow', {
extend: 'Ext.window.Window',

height: 350,
width: 550,
layout: {
type: 'absolute'
title: 'My Window',

initComponent: function() {
var me = this;

Ext.applyIf(me, {
items: [
xtype: 'gridpanel',
height: 120,
width: 550,
title: 'My Grid Panel',
columns: [
xtype: 'gridcolumn',
dataIndex: 'string',
text: 'String'
xtype: 'numbercolumn',
dataIndex: 'number',
text: 'Number'
xtype: 'datecolumn',
dataIndex: 'date',
text: 'Date'
xtype: 'booleancolumn',
dataIndex: 'bool',
text: 'Boolean'
viewConfig: {






9 May 2012, 6:12 AM
Thanks for the quick reply.
Actually the issue was store had buffered attribute as true but pageSize was not specified. This creates problem only if grid is used inside window panel.
If buffered attribute is removed of pageSize attribute is specified everything works fine.
But I could not correlate the relation.