PDA

View Full Version : empty rows in the grid during its render



stahl.stalin
12 Oct 2012, 8:21 AM
How can we get ten empty rows in the grid during its rendering which will be in editable mode?
I dont want to hard code things in any jsp file and then ajax calling it to make the empty rows.
Any sample code will be helpful.

scottmartin
12 Oct 2012, 12:58 PM
You can use the following. If you need to do this at store, you can use the load listener:



var store = Ext.create('Ext.data.Store', {
storeId : 'simpsonsStore',
fields : ['name', 'email', 'change'],
proxy : {
type : 'memory',
reader : {
type : 'json',
root : 'items'
}
}
});

var rec = { name: '', email: '', change: '' };
store.insert(0,rec); // create for; loop

console.log(store);


Scott.