1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    34
    Vote Rating
    0
    parasharsh is on a distinguished road

      0  

    Default Unanswered: EXTJS 4.1 : grid data is not shown properly if used in Ext.window.Window

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


    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;">
    <tbody>

    <tr class="x-grid-header-row">

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,075
    Answers
    673
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    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.

    Code:
    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: {
    
                        }
                    }
                ]
            });
    
            me.callParent(arguments);
        }
    
    });
    
    Ext.onReady(function(){
        Ext.create('MyWindow').show();
    });
    Regards,
    Scott

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    34
    Vote Rating
    0
    parasharsh is on a distinguished road

      0  

    Default


    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.

Thread Participants: 1