PDA

View Full Version : Grid column width



Achim74
15 Jul 2009, 8:23 AM
Hi !

I have a problem with my simple grid. It looks like the attached screenshot no matter if I use fixed or flexible widths for the GridPanel/column.



// Konditionen grid
KonditionenGrid = function() {
KonditionenGrid.superclass.constructor.call(this, {
renderTo: 'konditionen_grid',
title: 'Konditionen',
store: store,
sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
loadMask: true,
height: 300,
autoHeight: false,
width: 600,
stripeRows: true,
columns: [
{header: "Id", width: 50, sortable: true, dataIndex: 'id'},
{header: "Summe von", width: 50, sortable: true, dataIndex: 'summe_von'},
{header: "Summe bis", width: 50, sortable: true, dataIndex: 'summe_bis'},
{header: "Zins(%)", width: 50, sortable: true, dataIndex: 'zins_prozent'},
{
xtype: 'datecolumn',
header: 'Gueltig Ab',
dataIndex: 'gueltig_ab',
format: 'd.m.Y',
sortable: true,
width: 50,
groupRenderer: Ext.util.Format.dateRenderer('Y-m-d'),
editor: {
xtype: 'datefield',
allowBlank: true
}
},{
xtype: 'datecolumn',
header: 'Gueltig Bis',
dataIndex: 'gueltig_bis',
format: 'd.m.Y',
sortable: true,
width: 50,
groupRenderer: Ext.util.Format.dateRenderer('Y-m-d'),
editor: {
xtype: 'datefield',
allowBlank: true
}
}

],
plugins: konditionenGridFilters,
viewConfig: {
autoFill: true,
forceFit: true
},
tbar:[{

... Toolbar etc.



The columns are always out of alignment.

Can anyone give me a hint ? Thank you ...

aconran
15 Jul 2009, 8:56 PM
Use Firebug to inspect the markup, are you using any custom CSS with the grid? If you remove the custom css does this issue still occur? Does it happen in all browsers?

steffenk
15 Jul 2009, 11:51 PM
Column also have an "align" property

Stripeman
16 Jul 2009, 2:02 AM
remove these and see if your issue persists

autoFill: true,
forceFit: true