View Full Version : [CLOSED] [4.1.1a] Hide tree column with hidden headers is not working

25 Apr 2013, 1:00 AM
REQUIRED INFORMATION Ext version tested:

Ext 4.1.1a

Browser versions tested against:

Chrome 26


If hideHeaders-config option of a tree is set the true, hiding columns programmatically throws an exception in calculate method of Ext.grid.ColumnLayout

Steps to reproduce the problem:

Create a tree with multiple columns
Try to hide one of the columns programmatically by calling it's hide-method (or setWidth(0), ...)

The result that was expected:

The column should be hidden

The result that occurs instead:

The calculate method of Ext.grid.ColumnLayout threw an exception ("Uncaught TypeError: Cannot call method 'getProp' of undefined") because the property tableContext of the viewContext was undefined.

Test Case:
Ext.onReady(function() {
var tree = Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
width: 200,
height: 150,
hideHeaders: true,
store: Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [
{ text: "detention", leaf: true },
{ text: "homework", expanded: true, children: [
{ text: "book report", leaf: true },
{ text: "alegrbra", leaf: true}
] },
{ text: "buy lottery tickets", leaf: true }
columns: [{
xtype: 'treecolumn',
dataIndex: 'text',
flex: 1
xtype: 'actioncolumn',
align: 'right',
width: 20,
icon: 'http://docs.sencha.com/extjs/4.1.3/extjs-build/examples/simple-tasks/resources/images/edit_task.png'
renderTo: Ext.getBody()

Ext.create('Ext.form.field.Checkbox', {
boxLabel: 'Show action column',
checked: true,
handler: function(checkbox, checked) {
var actionCol = tree.down('actioncolumn');

if (actionCol) {
renderTo: Ext.getBody()

See this URL for live test case: http://jsfiddle.net/tKtq9/

Debugging already done:

See above

Possible fix:

not provided

Additional CSS used:

only default ext-all.css

Operating System:

Windows 8 64bit Pro

25 Apr 2013, 1:02 AM
One more thing: I've noticed that this is working in Ext 4.1.2 but unfortunately cannot switch to the new version by now.
Therefore I'd really appreciate if someone could point out a way to fix this in 4.1.1a.


25 Apr 2013, 8:02 AM
I'm glad it's fixed in the current (or current beta) version! While we're not patching old versions of the framework we are actively fixing bugs and releasing updated versions of the framework.

25 Apr 2013, 10:23 PM
@slemmon: I'm aware of the fact, that you don't provide official patches for old versions but still I'd really appreciate if someone could point me to a workaround or something so that i can make this work.

Should I open a new thread in the Q&A-Forum?

26 Apr 2013, 12:07 PM
You can open a new thread if you'd like. It's possible the community may offer a workaround.