Hi Kalum,
We have checked your
reported query and prepared the sample based on your requirement. Please refer
the below code snippet. Using the disabled property of button, we can
change it dynamically based on condition.
@Html.EJS().Button("btn").Content("Primary").IsPrimary(true).Render()
<br />
@Html.EJS().CheckBox("checked").Change("onChange").Checked(false).Label("CheckBox").Render()
<script>
document.getElementById("btn").addEventListener('click', function () {
var Btn =
document.getElementById("btn").ej2_instances[0];
Btn.disabled = true;
});
function onChange(args) {
if (args.checked) {
var Btn = document.getElementById("btn").ej2_instances[0];
Btn.disabled = false;
}
}
</script>
|
Could you please check the above code and
get back to us, if you need any further assistance on this.
Regards,
YuvanShankar A