PDA

View Full Version : [FIXED] [4.2.0 beta] Locking Grid: adding column using reconfigure doesn't work



Daniil
8 Jan 2013, 4:01 AM
REQUIRED INFORMATION

Ext version tested:

Ext 4.2.0 beta

Browser versions tested against:

Chrome
IE9

DOCTYPE tested against:

<!DOCTYPE html>

Description:

If a GridPanel is configured with a column with "locked: true", when adding a new column using the grid's reconfigure method doesn't work well. It adds a header cell, but not the rest cells.
Everything is OK if no locked column.

Steps to reproduce the problem:

Click the button

The result that was expected:

A new column: the header and the "body" cells

The result that occurs instead:

Only the header cell appears, not the "body" cells

Test Case:

<!DOCTYPE html>
<html>
<head>
<title>Grid locked reconfigure add column</title>

<link rel="stylesheet" href="../resources/css/ext-all.css" />

<script src="../ext-all-debug.js"></script>

<script>
Ext.onReady(function () {
var myColumns = [{
text: "Test1",
dataIndex: "test1",
locked: true
}, {
text: "Test2",
dataIndex: "test2"
}, {
text: "Test3",
dataIndex: "test3"
}];

Ext.create("Ext.button.Button", {
renderTo: Ext.getBody(),
text: "Add a column",
handler: function () {
var grid = Ext.getCmp("GridPanel1");

myColumns.push({
text: "New",
dataIndex: "test1"
});

grid.reconfigure(grid.getStore(), myColumns);
}
});
Ext.create("Ext.grid.Panel", {
id: "GridPanel1",
renderTo: Ext.getBody(),
store: {
fields: [{
name: "test1"
}, {
name: "test2"
}, {
name: "test3"
}],
data: [{
test1: "test1",
test2: "test2",
test3: "test3"
}]
},
columns: myColumns
});
});
</script>
</head>
<body>

</body>
</html>

mitchellsimoens
8 Jan 2013, 7:27 AM
Thanks for the report! I have opened a bug in our bug tracker.

pscanlon1
2 Oct 2013, 10:41 AM
There is no way to reconfigure a lockable grid....

Peter Tierney
7 Nov 2013, 12:00 PM
This took me a while to find but mixing the 3 seems to completely seize up the Chrome tab, which is better than the entire browser. Has anyone tried this before and found a fix or is this a true blue deep down bug with the grid?

It doesn't stop us as we'll just remove the lockable feature and life is good.

We are using 4.2.2, btw.

agunescu
4 Dec 2013, 6:55 AM
I have a problem with the reconfigure method when using it on a locked grid. I receive :
[CODE]
TypeError: el is null

[TABLE]

agunescu
4 Dec 2013, 6:56 AM
I have a problem with reconfigure when using it on a locked grid. I receive :

TypeError: el is null
el.removeCls.apply(el, arguments);
I don't know what the issue here, I've tried bebuggind reconfigure and reconfigureLockable methods and I've seen that the error shows on reconfigureLockable method, after:

lockedGrid.headerCt.add(columns.locked.items);
Any help please with this?
I am using ExtJS 4.2.2