PDA

View Full Version : radio group/ combobox not set when load the form to edit



ibcravi
14 Sep 2009, 9:23 AM
Hi Friends
when i load the form with getForm().load to edit radiogroup, combobox are not getting set with the date

how can i achieve? plz help me

regards
Ravi

14 Sep 2009, 10:50 AM
Ravi,
are you sure the field names match the data elements in inbound data? Also, are they rendered?

ibcravi
14 Sep 2009, 5:21 PM
Hi Thanks for your prompt response,

my code is as followes

{
xtype: 'radiogroup',
fieldLabel: 'Martial Status',
items: [
{boxLabel: 'Single', name: 'martial_status', inputValue: 0},
{boxLabel: 'Married', name: 'martial_status', inputValue: 1}
]
},
{
xtype: 'textarea',
fieldLabel: 'Address',
name:'client_address',
blankText: 'Address is required',
allowBlank: false
},
new Ext.form.ComboBox({
fieldLabel: 'Country',
hiddenName: 'country',
store: new Ext.data.ArrayStore({
fields: ['id','country'],
data : [[1,'India']]
}),
displayField: 'country',
valueField:'id',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
selectOnFocus:true,
width:190,
emptyText: 'Select Country'
}),

new Ext.form.ComboBox({
fieldLabel: 'State',
store: store,
name:'state',
displayField: 'state_name',
valueField:'id',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
selectOnFocus:true,
width:190,
emptyText: 'Select State'
}),

here is the json output
all the data is loading except radiogroup, combobox

{success: true,data:{"first_name":"ravi","last_name":"kanth","martial_status":"1","email":"[email protected]","phone":"12345","client_address":"jeedimetla","pin":"500115","city":"hyderabad","country":"1","state":"1","info":"he is my friends"}}

thanks

bijo
17 Sep 2009, 2:05 AM
Check this thread
http://www.extjs.com/forum/showthread.php?t=39161

and add the patch for radiogroup