PDA

View Full Version : selectionChange results to be stored in a Variable Array in a particular store



extj4newbee
14 May 2012, 8:02 PM
hi,
I have store "STORE1"with fields
f1,
f2,
roleIds,

and I have Code which selects roles from the grid
selectionChange(view,selected).{
var roleIds = [];
for (var i = 0; i < selected.length; i++) {
roleIds.push(selected[i].get('id'));
}

I want to store roleIds values in "STORE1" in field rolesIds.

How can assign to Store.
Thank you !!

scottmartin
15 May 2012, 6:25 AM
Do you want to add the selection array to a store as rows? store.insert(..)

Regards,
Scott.

extj4newbee
15 May 2012, 7:17 AM
hi,

No , not as row in Store, but Need to assign to one of the Field in STORE to "rolesIds"

thank you !!

scottmartin
16 May 2012, 6:26 AM
Have a look at:
record.set({name: value, ..});

Regards,
Scott.