PDA

View Full Version : [4.1 RC1] Incorrect width of the grouped grid columns with flex = 1



user ext
17 Mar 2012, 2:42 AM
REQUIRED INFORMATION
Ext version tested:


Ext 4.1 rc 1


Browser versions tested against:

Firefox 11.0 (firebug 1.9.1 installed)


Description:

If the grid is grouped, after dragging the header with flex=1 to another location, the width of the column does not correspond to the width of the header.


Steps to reproduce the problem:

Create grouped grid. See image 1.
Drag and drop the header (with flex=1) to to another place (in example 'Desc' drop before 'Date' ). See image 2.


The result that was expected:

The width of the columns should be equal to the width of the headers.


The result that occurs instead:

The width of the columns not equal to the width of the headers.


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


Ext.onReady(function ()
{
var data = [];
for (var i = 1; i < 20; i++)
{
data.push({ 'id': i, 'name': 'Name ' + i, 'date': '2010/01/12','desc': 'A hsrild fjdow;s jriel '+ i ' });
}

Ext.create('Ext.data.Store',
{
storeId: 'MyStore',
fields:
[
{ name: 'id', type: 'int' },
{ name: 'name', type: 'string' },
{ name: 'date', type: 'date' },
{ name: 'desc', type: 'string' }
],
data: data
});



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,
items:
{
xtype: 'grid', border: false, columnLines: true,
store: Ext.getStore('MyStore'),
columns:
[
{ text: 'No', xtype: 'rownumberer', width: 30 },
{ text: 'id', dataIndex: 'id', width: 70 },
{ text: 'Name', dataIndex: 'name', flex: 1 },
{ text: 'Date', dataIndex: 'date', width: 120, xtype: 'datecolumn' },
{ text: 'Desc', dataIndex: 'desc', flex: 1}
],
features: [{ ftype: 'grouping', groupHeaderTpl: '{name} [{rows.length}]', startCollapsed: false, hideGroupedHeader: true}],
}
});


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

});
Screenshot or Video:

attached


Possible fix:

not provided


Operating System:

Win7

evant
17 Mar 2012, 2:51 AM
Thanks for the report, we've already caught this one in our testing, will be fixed in the next release.