PDA

View Full Version : Adding record to store then grid



jaise
13 Jul 2010, 12:20 PM
How do I add the record to the data store, which will then add to the grid?



// declared in a different method which is why you see getStore() below
var agendaStore = new Ext.data.ArrayStore({
fields: [
{
name: 'title'
},
{
name: 'duration'
},
{
name: 'index'
},
{
name: 'agendaItemID'
},
{
name: 'resourceDescription'
},
{
name: 'resourceURLorQTY'
},
{
name: 'resourceType'
}
]
});

// tried new Ext.data.Record.create and that didn't work either...
var record = new grid.getStore().record({
title: newAgendaItem[0],
duration: newAgendaItem[1],
index: newAgendaItem[2],
agendaItemId: newAgendaItem[3],
resourceDescription: newAgendaItem[4],
resourceURLorQTY: newAgendaItem[5],
resourceType: newAgendaItem[6]
});

grid.getStore().add(record);




thank you for your time!!!!

13 Jul 2010, 2:26 PM
new grid.getStore().recordType({