PDA

View Full Version : [CLOSED] ExtJS 4.1-Beta-3 Ext.grid.RowEditor. Does not appear previously hidden column



user ext
27 Feb 2012, 10:15 AM
REQUIRED INFORMATION
Ext version tested:

Ext 4.1.0 beta 3

Browser versions tested against:

FF 10.0.2 (firebug 1.9.1 installed)

Description:

Ext.grid.RowEditor.
First editor hidden and hide some of the column. If again show the hidden column and start editing, the editor does not display the new column.

Test Case:
Ext.Loader.setConfig({ enabled: true });
Ext.Loader.setPath({ 'Ext': 'extjs', 'Ext.ux': 'ux' });
Ext.require([
'Ext.grid.*',
'Ext.data.*'
]);

Ext.onReady(function ()
{
Ext.create('Ext.data.Store',
{
storeId: 'MyStore',
fields:
[
{ name: 'id', type: 'int' },
{ name: 'name', type: 'string' },
{ name: 'date', type: 'date' }
],
data:
[
{ 'id': 1, 'name': 'Name 1', 'date': '2010/01/22' },
{ 'id': 2, 'name': 'Name 2', 'date': '2010/01/23' },
{ 'id': 3, 'name': 'Name 3', 'date': '2010/01/24' },
{ 'id': 4, 'name': 'Name 4', 'date': '2010/01/25' }
]
});

Ext.define('MyGridWindow',
{
extend: 'Ext.window.Window', id: 'mygridwindow',
title: 'My grid Window',
width: 500, height: 220, x: 50, y: 108,
maximizable: true, closeAction: 'hide', layout: 'fit', collapsible: true, animCollapse: false,
shadow: true,
items:
{
xtype: 'grid', border: false, columnLines: true,
store: Ext.getStore('MyStore'),
columns:
[
{ text: 'No', xtype: 'rownumberer' },
{ text: 'id', dataIndex: 'id', width: 70, editor: 'numberfield' },
{ text: 'Name', dataIndex: 'name', flex: 1, editor: 'textfield' },
{ text: 'Date', dataIndex: 'date', width: 120, xtype: 'datecolumn', editor: 'datefield' }
],
plugins: [{ ptype: 'rowediting', clicksToEdit: 2}],
features: [{ ftype: 'grouping', groupHeaderTpl: '{name} [{rows.length}]', startCollapsed: true, hideGroupedHeader: false}]
}
});

Ext.getStore('MyStore').group('name', 'ASC');
Ext.create('MyGridWindow');
Ext.getCmp('mygridwindow').show();

}); HELPFUL INFORMATION
Debugging already done:

yes

Possible fix: class Ext.grid.RowEditing Before

onColumnShow: function(column) {
var field = column.getEditor();
if (this.isVisible()){
field.setWidth(column.getWidth() - 2).show();
this.reposition();
}
}
After

onColumnShow: function(column) {
var field = column.getEditor();
field.setWidth(column.getWidth() - 2).show();
if (this.isVisible()){
this.reposition();
}
}
Operating System:

Win7

evant
27 Feb 2012, 3:46 PM
Thanks for the report, we already have a ticket open for this, EXTJSIV-5404.

user ext
27 Feb 2012, 8:27 PM
Sorry for the inaccuracy.
Possible fix: in class
Ext.grid.RowEditor

file: ext-all-debug-w-comments.js
row: 150006