Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member
    Join Date
    May 2009
    Posts
    157
    Vote Rating
    9
    ZachG will become famous soon enough

      0  

    Default [4.1.0] Grid with Empty String Columns Displays, Didn't in 4.0.7

    [4.1.0] Grid with Empty String Columns Displays, Didn't in 4.0.7


    REQUIRED INFORMATION\
    Ext version tested:
    • ExtJS 4.1.0
    Browser versions tested against:
    • Chrome
    Description:
    • I have a grid with two columns, and their text is the empty string.
    • In 4.0.7, using the empty string made the column headers hidden.
    • In 4.1.0, the column headers are small but still visible.
    Steps to reproduce the problem:
    • Run the code below in 4.0.7 and 4.1.0.
    The result that was expected:
    • It would look like 4.0.7
    The result that occurs instead:
    • Nope
    Test Case:
    Code:
    Ext.create("Ext.window.Window", {
    	width:500,
    	height:500,
    	layout:"fit",
    	items:[
    		{
    			xtype:"grid",
    			store:{
    				proxy:{
    					type:"memory",
    					reader:{
    						type:"json"
    					}
    				},
    				model:Ext.define("MyModel", {
    					extend:"Ext.data.Model",
    					fields:["a", "b"]
    				}) && "MyModel"
    			},
    			columns:[
    				{
    					text:"",
    					dataIndex:"a"
    				},
    				{
    					text:"",
    					dataIndex:"b"
    				}
    			]
    		}
    	]
    }).show();
    Attached Images

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,095
    Vote Rating
    855
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You can actually make sure the header container is hidden by specifying the columns as a config of the header container:

    Code:
    columns : {
        hidden : true,
        items  : [
            {
                text      : "",
                dataIndex : "a"
            },
            {
                text      : "",
                dataIndex : "b"
            }
        ]
    }
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,920
    Vote Rating
    632
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Or alternatively use the hideHeaders config on the grid. This was actually a bug in 4.0.x, the header should always show up if it's not configured with hidden: true.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 2