PDA

View Full Version : [OPEN EXTJSIV-2125] [4.0.1] Checkboxes column disappear when calling reconfigure()



estemendoza
27 May 2011, 7:02 AM
Hi

The problem that I'm having is that if I create a grid with CheckboxModel:



var sm = Ext.create('Ext.selection.CheckboxModel');

var taskGrid = Ext.create('Ext.grid.GridPanel', {
selModel: sm,
...


the grid is rendered correctly with a column with checkboxes for every row.

But if a do a reconfigure, this column disappears.

Any ideas?

Thanks

mike.estes
27 May 2011, 10:33 AM
We need more information about the problem you are running into, specifically some example code. Please review this thread for info about how to post bug reports:

http://www.sencha.com/forum/showthread.php?71015-Posting-to-the-Bug-Forum

estemendoza
27 May 2011, 11:18 AM
Ext version tested:

Ext 4.0.1

Adapter used:

none

css used:

only default ext-all.css

Browser versions tested against:

FF3 (firebug 1.7.1 installed)

Operating System:

Windows 7

Description:

I have a grid with a CheckboxModel column and I have 2 different configuration of columns groups depending on a parameter.

The grid is loaded with the default column group and after that I check that parameter.
If the parameter is true, I do a reconfigure to the grid to load another set of column group. In that moment, the checkboxmodel column is not rendered anymore.

Test Case:
var defaultColumns = [
{header: 'Description', width: 400, dataIndex: 'description', renderer: descriptionRenderer, sortable: true},
{header: 'Test', width: 200, dataIndex: 'worker_id', renderer: workerRenderer, sortable: true},
];
var otherColumns = [
{header: 'Testing', width: 400, dataIndex: 'description', renderer: descriptionRenderer, sortable: true},
{header: 'Paper', width: 200, dataIndex: 'worker_id', renderer: workerRenderer, sortable: true},
];

var sm = Ext.create('Ext.selection.CheckboxModel');

// create the Grid
var taskGrid = Ext.create('Ext.grid.Panel', {
selModel: sm,
columnLines: true,
width: "100%",
store: tasksStore,
columns: defaultColumns,
...

//THIS IS WHEN THE CHECKBOXMODEL COLUMN DISAPPEARS
if(parameter){
taskGrid.reconfigure(tasksStore, otherColumns)
}

mike.estes
27 May 2011, 12:24 PM
confirmed the bug, created a bug report, will update this thread accordingly. Thank you for reporting this issue!

edspencer
29 Aug 2011, 6:37 PM
This has been fixed in 4.0.6