Reputation: 587
I have an ExtJs grid but the grid rows are not aligned correctly with the grid header. There is a little gap between the starting point and ending point of the grid rows
Some one who knows the reason for this, please help me.
Upvotes: 0
Views: 7200
Reputation: 4980
You should set width
property as follows ( this is the set data width ):
{text: 'VARIANT', dataIndex: 'VAR', width: 73, align: 'center'}
If you want to set column header width, then :
{text: 'VARIANT', dataIndex: 'VAR', width: 73, align: 'center', columnWidth: 80}
Or, if you want to Autofit colums, then :
{text: 'VARIANT', dataIndex: 'VAR', flex: 1, align: 'center'}
// or set default for all columns
columns: {
items: [
{
text: "COLUMNA"
dataIndex: "FIELDA"
},{
text: "COLUMNB",
dataIndex: "FIELDB"
},
...
],
defaults: {
flex: 1
}
}
Upvotes: 3