View Full Version : adding items dymanicaaly into store

31 Jan 2010, 10:56 PM

I am using itemselector and grid panel.
I drag the items from fromStore to toStore. works perfect.
Also there is one button clicking on which a grid panel gets opened in popup.
What I want is , I select the items from the grid (using checkboxselectionmodel) and when I click on 'Save' button, the selected items should get added in the toStore.

Please help, how to achieve this.


1 Feb 2010, 12:16 AM
store.add(records[]); ?

1 Feb 2010, 12:34 AM
thanks nicobarten.

But can you give me example.
The code I am using is

var KRAReader = new Ext.data.JsonReader({
root: 'records', // Containd the Records
totalProperty: 'totalCount' // Contains no. of Records
{name: 'id',mapping:'id'},
{name: 'name',mapping:'name'},

stAllKRA = new Ext.data.Store({
remoteSort: true,
proxy: new Ext.data.HttpProxy({
url: 'getdata.php',
method: 'POST'
reader: KRAReader,
desig : desig

This store already have data in it.
I want to add records checked in the grid panel.

How can I use the add method