prijithkr
6 Aug 2012, 12:00 AM
Hai I have a grid, which allows ADD/EDIT/DELETE records,
I used rowEdititng plugin for Editing purpose.... but how to add a Editable Blank row on top of Grid, on clcik of Add button and on click of submit, it should be added to the Store as wel... :-/
var cRGrid=Ext.create('Ext.grid.Panel', {
store: cRStore,
height: 280,
overflowY:'auto',
anchor:'100% 80%',
columns: [
{header: 'Date', dataIndex: 'date',flex:1},
{header: 'Contributions ($)', dataIndex: 'contributions',flex:1,
editor: {
xtype: 'textfield'}
},
{header: 'Redemptions ($)', dataIndex: 'redemptions',
editor: {
xtype: 'textfield'
},flex:1
},
{header: 'Total', dataIndex: 'total',flex:1}
],
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1
})
]
});
I used rowEdititng plugin for Editing purpose.... but how to add a Editable Blank row on top of Grid, on clcik of Add button and on click of submit, it should be added to the Store as wel... :-/
var cRGrid=Ext.create('Ext.grid.Panel', {
store: cRStore,
height: 280,
overflowY:'auto',
anchor:'100% 80%',
columns: [
{header: 'Date', dataIndex: 'date',flex:1},
{header: 'Contributions ($)', dataIndex: 'contributions',flex:1,
editor: {
xtype: 'textfield'}
},
{header: 'Redemptions ($)', dataIndex: 'redemptions',
editor: {
xtype: 'textfield'
},flex:1
},
{header: 'Total', dataIndex: 'total',flex:1}
],
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1
})
]
});