PDA

View Full Version : Can we place combo in header of grid



amanind
18 Nov 2010, 6:37 AM
Please refer screenshot and code also,
If this is possible, please let me know how.23406



var config = {
frame: true,
hideBorders: true,
timeout: 60000,
header: false,
layout: 'table',

layoutConfig: {
columns: 2
},
buttonAlign: 'right',
buttons: [
{
text: 'Edit',
id: 'editBtn',
handler: function() {
Ext.getCmp('saveBtn').enable().enabled = true;
Ext.getCmp('cancelBtn').enable().enabled = true;
Ext.getCmp('editBtn').disable().disabled = true;
}
},{
text: 'Save',
id: 'saveBtn',
disabled: true,
handler: function() {

}
},
{
text: 'Cancel',
id: 'cancelBtn',
disabled: true,
handler: function() {
Ext.getCmp('saveBtn').disable().disabled = true;
Ext.getCmp('cancelBtn').disable().disabled = true;
Ext.getCmp('editBtn').enable().enabled = true;
}
}],


store: this.store,
columns: [{
id: 'investment',
header: '',
width: 400,
sortable: false,
dataIndex: 'investment'
},
{
header: 'IRR',
width: 125,
sortable: false,
align: 'right',
renderer: this.msrefUSD,
editor : new Ext.form.TextField(),
dataIndex: 'msrefUSD'
},
{
header: 'Equity Multiple',
width: 125,
sortable: false,
align: 'right',
renderer: this.msrefNET,
editor : new Ext.form.TextField(),
dataIndex: 'msrefNET'
},
{
header: 'IRR',
width: 125,
sortable: false,
align: 'right',
renderer: this.exitDate,
editor : new Ext.form.TextField(),
dataIndex: 'exitDate'
},
{
header: 'Equity Multiple',
width: 125,
sortable: false,
align: 'right',
renderer: this.generalC,
editor : new Ext.form.TextField(),
dataIndex: 'generalC'
}],
stripeRows: true,
enableHdMenu: false,
enableColumnMove: false,
enableColumnResize: false,
autoExpandColumn: 'investment',
height: 210,
width: 900,
plugins: [

new Ext.ux.grid.ColumnHeaderGroup({
rows: [
[{
// no header
},
{
header: '(Per Investment Committee Book)',
align: 'center',
colspan: 2
},
{
header: '(Per Final Underwriting/Magic Page)',
align: 'center',
colspan: 2
}]
]
})
]
};