I may be missing something, but how do I programmatically check a radiobutton using ExtJS (v 3)?
The following doesn't seem to always work
var radio = Ext.get("myradiobutton");
radio.set("checked,"");
The radio is sometimes checked, sometimes not...
radio.is(":checked") sometimes return true, sometimes false
Thanks
I'd suggested using this function: http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.Radio-method-setValue
var radio = Ext.get("myradiobutton");
radio.setValue(true);
Why not just use the DOM?
Ext.getDom('myradio').checked = true;
For me it worked using the getCmp
and setValue
functions.
Ext.getCmp('yourid').setValue(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With