I have radio button. I have one Checked button and another one Unchecked button. When i click unchecked button there should unchecked the selected radio button. when i click checked button there should checked the unchecked radio button.
help me.![]()
I have radio button. I have one Checked button and another one Unchecked button. When i click unchecked button there should unchecked the selected radio button. when i click checked button there should checked the unchecked radio button.
help me.![]()
Here is an example:
ps. But normally, you don't uncheck a radio...Code:new Ext.Viewport({ layout: 'fit', items: { xtype: 'form', items: [{ id: 'radio', fieldLabel: 'Radio', xtype: 'radio', name: 'radio' }], tbar: [{ text: 'Check', handler: function(){ Ext.getCmp('radio').setValue(true); } },{ text: 'Uncheck', handler: function(){ Ext.getCmp('radio').setValue(false); } }] } });
ExtJS 6.5
Code:Ext.define('Overrides.form.field.Radio', { override: 'Ext.form.field.Radio', initComponent: function (radio) { radio.dom.onclick = function(){ radio.setValue(!radio.value ); } } });
Thanks
Albanir Neves