Results 1 to 2 of 2

Thread: [CLOSED][PR3] Ext.grid.View - emptyText not always rendered

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Dec 2007
    Posts
    40
    Vote Rating
    0
      0  

    Default [CLOSED][PR3] Ext.grid.View - emptyText not always rendered

    I found a situation where emptyText is not displayed.
    Code being always better than word:
    Code:
    Ext.onReady(function() {
                var grid1 = Ext.create("Ext.grid.GridPanel", {
                    title: "Grid panel",
                    renderTo: "grid1",
                    height: 300,
                    width: 300,
                    viewConfig: {
                        emptyText: "Empty text....",                    
                        deferEmptyText: false
                    },
                    store: Ext.create("Ext.data.Store", {
                        fields: [
                            "value"
                        ],
                        proxy: {
                            type: "memory",
                            reader: "array"
                        }
                    }),
                    items: [{
                        headers: [{
                            text: "Header",
                            dataIndex: "value",
                            flex: 1
                        }]
                    }]
                });
                
                var grid2 = Ext.create("Ext.grid.GridPanel", {
                    title: "Grid panel",
                    renderTo: "grid2",
                    height: 300,
                    width: 300,
                    viewConfig: {
                        emptyText: "Empty text....",
                        deferEmptyText: false
                    },
                    store: Ext.create("Ext.data.Store", {
                        fields: [
                            "value",
                        ],
                        proxy: {
                            type: "memory",
                            reader: "array"
                        }
                    }),
                    headers: [{
                        text: "Header",
                        dataIndex: "value",
                        flex: 1
                    }]
                });
            });
    In the first grid, headers are declared in the "items" property and grid view "displayText" is not displayed.
    In the second, headers are declared directly as a property of the grid and "displayText" is displayed as expected.

  2. #2
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,941
    Vote Rating
    919
      0  

    Default

    The headers should go directly on the grid, not under items.
    Twitter - @evantrimboli
    Former framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Similar Threads

  1. Problem in view of GridPanel column menu when rendered in ToolTip
    By livinglegends in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 5 Jan 2011, 12:06 AM
  2. Bug in MultiSelect? View isn't rendered in 2nd tab panel
    By prodigy7 in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 20 Oct 2009, 10:39 PM
  3. [OPEN] [2.0rc1][CLOSED] emptyText is submitted
    By JorisA in forum Ext 2.x: Bugs
    Replies: 5
    Last Post: 17 Nov 2008, 10:22 AM
  4. Change 'emptyText' of a Ext.View after created
    By zeppelin in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 2 Jul 2007, 7:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •