Hi Tümer,
Thank you for contacting Syncfusion support
We have checked your reported query, we can achieve this in radio button change event. In change event we can set true/false to set the enable /disable property for textbox component. Please find the below code snippet:
Index.cshtml
|
<div class="row">
<ejs-radiobutton id="radio1" label="Enable" name="payment" value="enable" checked="true" change="onChange"></ejs-radiobutton>
</div>
<div class="row">
<ejs-radiobutton id="radio2" label="Disable" name="payment" value="disable" change="onChange"></ejs-radiobutton>
</div>
<div class="control-section">
<ejs-textbox id="firstname" placeholder="First Name"></ejs-textbox>
</div>
<script>
function onChange(args) {
var textboxObj = ej.base.getComponent(document.getElementById('firstname'), 'textbox');
if (args.value == "disable") {
textboxObj.enabled = false;
}
else if (args.value == "enable") {
textboxObj.enabled = true;
}
}
</script> |
Could you please check the above code snippet and get ack to us if you need further assistance on this?
Regards,
Saranya D