-
1 May 2012 11:45 AM #1
[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
- Chrome
- 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.
- Run the code below in 4.0.7 and 4.1.0.
- It would look like 4.0.7
- Nope
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();
-
7 May 2012 8:50 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 435
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.
-
7 May 2012 2:05 PM #3
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!
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote