Code:
Ext.grid.data_invoiceLine = [['1','2','3','4','5','6','7 <input type="text" name="text"/>']];
Ext.onReady(function(){
var xg = Ext.grid;
var reader_invoiceLine = new Ext.data.ArrayReader({}, [{name: '0'},{name: '1'},{name: '2'},{name: '3'},{name: '4'},{name: '5'},{name: '6'},{name: '7'}]);
var expander_invoiceLine = new xg.RowExpander({
tpl : new Ext.Template('<div class="expand">{6}</div>')
});
component['invoiceLineExpander'] = expander_invoiceLine;
var grid_invoiceLine = new xg.GridPanel({
ds: new Ext.data.Store({
proxy: new Ext.data.MemoryProxy(xg.data_invoiceLine),
reader: reader_invoiceLine
}),
cm: new xg.ColumnModel([
expander_invoiceLine,
{header: 'From', width: 60, sortable: false, dataIndex: '0',align:'left'},
{header: 'Until', width: 60, sortable: false, dataIndex: '1',align:'left'},
{header: 'Type', width: 20, sortable: true, dataIndex: '2',align:'left'},
{header: 'Amount', width: 40, sortable: true, dataIndex: '3',align:'left'},
{header: 'Status', width: 40, sortable: true, dataIndex: '4',align:'left'},
{header: 'Action', width: 50, sortable: false, dataIndex: '5',align:'left'}
]),
viewConfig: {
forceFit:true
},
width: 850,
autoHeight:true,
plugins: [expander_invoiceLine],
collapsible: false,
disableSelection: false,
iconCls: 'icon-grid',
renderTo: 'gridholder_invoiceLine'
});
grid_invoiceLine.store.load();
expander_invoiceLine.expandRow ( 0 );
});