freezq
29 Jun 2010, 10:20 PM
var combo1 = new Ext.form.ComboBox({
typeAhead: true,
triggerAction: 'all',
lazyRender:true,
mode: 'local',
fieldLabel:'AllowNull',
hiddenName:'combo1',
id:'nullable',
editable:false,
store: new Ext.data.ArrayStore({
id: 0,
fields: [
'myId',
'displayText'
],
data: [[1, 'Yes'], [0, 'No']]
}),
valueField: 'myId',
displayField: 'displayText'
});
i use Ext.getCmp('combo1').setValue("Yes") to display "Yes".but i want to pass the value 1 to the server when the form submited.how can i do that?
typeAhead: true,
triggerAction: 'all',
lazyRender:true,
mode: 'local',
fieldLabel:'AllowNull',
hiddenName:'combo1',
id:'nullable',
editable:false,
store: new Ext.data.ArrayStore({
id: 0,
fields: [
'myId',
'displayText'
],
data: [[1, 'Yes'], [0, 'No']]
}),
valueField: 'myId',
displayField: 'displayText'
});
i use Ext.getCmp('combo1').setValue("Yes") to display "Yes".but i want to pass the value 1 to the server when the form submited.how can i do that?