Yusan Susandi
Yusan Susandi

Reputation: 229

How to set enable true or false RadNumericTextBox Telerik in javascript

I have code like

function setTextBoxEnable() {

            var tbMonthlyInstallment = $find("<%= tbMonthlyInstallment.ClientID %>");
            var isChecked = $find("<%= rdLoanAmount.ClientID %>").get_checked();
            if (isChecked) {

                tbMonthlyInstallment.enable= true; 

            }
            else {
                tbMonthlyInstallment.enable= false; 
            }

        }

But not work,
How to set property enable in RadNumericTextBox
Thanks,

Upvotes: 0

Views: 3328

Answers (1)

Brian Garson
Brian Garson

Reputation: 1160

you actually need to use the api and call two separate methods, try this http://www.telerik.com/help/aspnet-ajax/input-client-side-radnumerictextbox.html

function setTextBoxEnable() {

            var tbMonthlyInstallment = $find("<%= tbMonthlyInstallment.ClientID %>");
            var isChecked = $find("<%= rdLoanAmount.ClientID %>").get_checked();
            if (isChecked) {

                tbMonthlyInstallment.enable(); 

            }
            else {
                tbMonthlyInstallment.disable(); 
            }

        }

Upvotes: 1

Related Questions