Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    May 2009
    Posts
    121
    Vote Rating
    7
    ZachG is on a distinguished road

      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
    St. Louis, MO
    Posts
    33,599
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      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
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost 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
    15,068
    Vote Rating
    97
    evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold evant is a splendid one to behold

      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!