SoccerGee
19 Sep 2012, 6:45 AM
I am new.
I'm trying to place a grid inside of a panel. However the panel defaults to the size of the browser- whereas the grid in the panel defaults to a width of 10,000px. The rendering of the grid looks as if it is overflowing the panel to the right (which is how I discovered the width problem). This causes there to be no border to the right of the grid- looks awful. Is there a way to fit the grid inside of the panel without specifying a specific width?
quick note:
- I have not populated the store with any data.
Here's some code of my objects and what not:
this.gridContainer = Ext.create('Ext.grid.Panel', {
width: 900,
title: 'Status',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns:
{
defaults: {
width: 100
},
items: [
{ text: 'Name', dataIndex: 'Name' },
{ text: 'DisplayName', dataIndex: 'DisplayName' },
{ text: 'Active', dataIndex: 'Active' },
{ text: 'Created Date', dataIndex: 'CreatedDate' },
{ text: 'Updated Date', dataIndex: 'UpdatedDate' },
{ text: 'Record Version', dataIndex: 'RecordVersion' },
{ text: 'Description', dataIndex: 'Description',flex:1}
]
}
});
this.add(this.gridContainer);
}
instantiation:
this.cptStatus = Ext.create('Company.Cloud.UI.forms.Status', {
});
this.add(this.cptStatus);
Thanks in advance!
I'm trying to place a grid inside of a panel. However the panel defaults to the size of the browser- whereas the grid in the panel defaults to a width of 10,000px. The rendering of the grid looks as if it is overflowing the panel to the right (which is how I discovered the width problem). This causes there to be no border to the right of the grid- looks awful. Is there a way to fit the grid inside of the panel without specifying a specific width?
quick note:
- I have not populated the store with any data.
Here's some code of my objects and what not:
this.gridContainer = Ext.create('Ext.grid.Panel', {
width: 900,
title: 'Status',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns:
{
defaults: {
width: 100
},
items: [
{ text: 'Name', dataIndex: 'Name' },
{ text: 'DisplayName', dataIndex: 'DisplayName' },
{ text: 'Active', dataIndex: 'Active' },
{ text: 'Created Date', dataIndex: 'CreatedDate' },
{ text: 'Updated Date', dataIndex: 'UpdatedDate' },
{ text: 'Record Version', dataIndex: 'RecordVersion' },
{ text: 'Description', dataIndex: 'Description',flex:1}
]
}
});
this.add(this.gridContainer);
}
instantiation:
this.cptStatus = Ext.create('Company.Cloud.UI.forms.Status', {
});
this.add(this.cptStatus);
Thanks in advance!