This is a migrated thread and some comments may be shown as answers.

Disable via javascript

1 Answer 119 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Fadi
Top achievements
Rank 1
Veteran
Fadi asked on 02 Oct 2014, 07:28 PM
Is there a way to disable the text box visually and from editing using javascript? I was using the radComboBox and it had the .disable() & .enable() functions. I see AutoCompleteBox has the set_enabled(i) however the control appearance is still enabled.

1 Answer, 1 is accepted

Sort by
0
Accepted
Nencho
Telerik team
answered on 07 Oct 2014, 10:46 AM
Hello Fadi,

Indeed the functions that you attempted to use should achieve the desired behavior. I have already forwarded this issue to our developer team as a bug, which is why I have updated your Telerik Points. As a temporal work-around, I would suggest you to use jQuery in the following manner :

<script type="text/javascript">
        function disabledAutoCompleteBox() {
            $telerik.$(".racTokenList").addClass("racDisabled");
            $telerik.$(".racInput").attr('disabled', 'disabled')
        }
    </script>


Regards,
Nencho
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
AutoCompleteBox
Asked by
Fadi
Top achievements
Rank 1
Veteran
Answers by
Nencho
Telerik team
Share this question
or