<div class="row">
<ejs-radiobutton id="rdEmp" label="Officer" name="rdRole" value="Emp"></ejs-radiobutton>
//...
</div>
<ejs-button id="btn" content="Select" onClick="btnClick()"></ejs-button>
<script>
function btnClick() {
//Direct access of RadioButton instance.
var rb = document.getElementById('rdEmp').ej2_instances[0];
rb.checked = true;
//Recommended way to access instance.
//var rbObj = ej.base.getComponent(document.getElementById("rdEmp"), 'radio');
//rbObj.checked = true;
}
</script
|
var rbObj = ej.base.getComponent(document.getElementById("rdEmp"), ej.buttons.RadioButton);
rbObj.checked = true;
|