-
4 Jan 2013 2:36 AM #1
[4.2.0 Beta] Grid with all columns hidden throws error
[4.2.0 Beta] Grid with all columns hidden throws error
REQUIRED INFORMATION
Ext version tested:- Ext 4.2.0 Beta
Browser versions tested against:- IE10
- Chrome 23
DOCTYPE tested against:- <!DOCTYPE html>
Description:- If you create a grid with all columns hidden by default then you get a Javascript error.
- This worked in previous versions.
Steps to reproduce the problem:- Create a grid with all columns set to hidden:true.
- Load page.
Test Case:
Code:Ext.define('MyApp.view.Viewport', { extend: 'Ext.container.Viewport', layout: { type: 'fit' }, items: [ { xtype: 'gridpanel', title: 'My Grid Panel', columns: [ { xtype: 'gridcolumn', hidden: true, dataIndex: 'string', text: 'String' }, { xtype: 'numbercolumn', hidden: true, dataIndex: 'number', text: 'Number' }, { xtype: 'datecolumn', hidden: true, dataIndex: 'date', text: 'Date' }, { xtype: 'booleancolumn', hidden: true, dataIndex: 'bool', text: 'Boolean' } ] } ] }); Ext.application({ autoCreateViewport: true, name: 'MyApp' });
HELPFUL INFORMATION
Debugging already done:- Error occurs on line 151084 of ext-all.js.
- The error is caused because the variable lastVisibleColumn is undefined when all columns are hidden (due to the loop above only assigning visible columns to it).
Possible fix:- Check for undefined before accessing lastVisibleColumn.
Operating System:- Windows 8 Enterprise
-
4 Jan 2013 6:56 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,581
- Vote Rating
- 433
This has already been fixed for the next release.
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.
This issue duplicates another issue.


Reply With Quote