hi, i want to disable a comboBox when i select a radiobutton from a radioGroup but when i execute the code launches me the next error:
Uncaught TypeError: Cannot call method 'setDisable(true)' of undefined
My code is next:
Code:
Ext.create( 'Ext.form.Panel',{
alias: 'widget.addewr',
title: 'Add EWR',
border: false,
items:[
{
xtype:'form',
width: '500',
border: false,
items: [
{
xtype: 'radiogroup',
// Arrange radio buttons into two columns, distributed vertically
columns: 1,
vertical: true,
items: [
{
boxLabel: 'Validation',
name: 'val',
width: 400,
inputvalue: 1
},
{
xtype: 'form',
layout: 'hbox',
border: false,
items: [
{
//add combobox Select Validation phase
xtype: 'combobox',
name: 'validationcombo',
anchor: '100%'
},
{
xtype: 'splitter'
},
{
//add combobox Level
xtype: 'combobox',
name: 'levelcombo',
anchor: '100%'
}
]
},
{
xtype: 'splitter'
},
{
// add the radio button for Verification
name: 'val',
boxLabel: 'Verification',
anchor: '100%',
inputvalue: 2,
checked: true,
listeners: {
click: {
element: 'el',
fn: function(){
console.log('click el');
var x = Ext.getCmp('validationcombo').setDisable(true);
console.log(x);
}
}
}
}]
}]
}]
});
Thanks!!