can we bind static json store with radiogroup in ext?
Radiogroups and Stores are not directly related in ExtJS. It's easy to populate form values from a store, but using a store to actually create the fields requires a slight work around. Specifically, you would have to do something like this (assuming Ext 3.3.1), and that your JsonStore is already set up...
var store = <your predefined store, with records>;
var itemsInGroup = [];
store.each( function(record) {
itemsInGroup.push( {
boxLabel: record.someLabel,
name: record.someName,
inputValue: record.someValue
});
});
var myGroup = {
xtype: 'radiogroup',
fieldLabel: 'My Dynamic Radiogroup',
items: itemsInGroup
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With