PDA

View Full Version : RadioGroup Problem



mnakula
15 Sep 2009, 5:45 AM
I am using radiogroup in my application. I have to display the radio items in radiogroup dynamically.

I am getting the JSON response from server as :

{data:confidenceType:
[
{label:"Lower Label",value:"LOWER"},
{label:"Normal",value:"NRML"},
{label:"Upper Label",value:"UPPER"}],
]
}

I have to make the label as boxlabel and value as inputvalue.

I need to generate radiogroup items(radio) from above response dynamically like:



{
xtype: 'radiogroup',
name: 'xyz',
columns: 1,
horizontal: false,
items: [{
name: 'abc',
inputValue: 'NRML',
boxLabel: 'Normal'
}, {
name: 'abc',
inputValue: 'UPPER',
boxLabel: 'Upper Label'
}, {
name: 'abc',
inputValue: 'LOWER',
boxLabel: 'Lower Label'
}]
}

Condor
15 Sep 2009, 11:48 PM
This thread (http://www.extjs.com/forum/showthread.php?p=363433#post363433) might help.