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

Disable textbox in radcombox

5 Answers 406 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Yann
Top achievements
Rank 1
Yann asked on 14 Jan 2020, 09:50 AM

Hello,

I have a radcombobox, and when I disable it, I can still enter text in the textbox. How can I also disable the textbox so no text can be enter when my combobox is desabled ?

Thanx for your help.

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 16 Jan 2020, 12:04 PM

Hi Yann,

How do you disable the combobox? If I set Enabled="false" it gets completely disabled along with the input.

Nevertheless, you can disable the input on your end with the help of the following script:

<telerik:RadComboBox ID="RadComboBox1" runat="server"  Filter="StartsWith"
    OnClientLoad="OnClientLoadHandler">
    <Items>
        <telerik:RadComboBoxItem Text="Item1" />
        <telerik:RadComboBoxItem Text="Item2" />
        <telerik:RadComboBoxItem Text="Item3" />
    </Items>
</telerik:RadComboBox>
<script>
    function OnClientLoadHandler(sender) {
        sender.get_inputDomElement().readOnly = "readonly";
    }
</script>

 

Regards,
Rumen
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
0
Zubair
Top achievements
Rank 1
Veteran
answered on 19 Jan 2020, 12:23 PM

dear Yann, Please help me on this.. 

https://www.telerik.com/forums/radcombobox-inside-radtooltip-datasource-not-updating

0
Rumen
Telerik team
answered on 21 Jan 2020, 01:27 PM

Hi Zubair,

I provided some hints on how to debug the problem at https://www.telerik.com/forums/radcombobox-inside-radtooltip-datasource-not-updating

Regards,
Rumen
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
0
Yann
Top achievements
Rank 1
answered on 23 Jan 2020, 12:59 PM

Hi Rumen,

Yes, i set Enabled="false" in the code behind, when the users select some options, but i still have the textbox, even if the combobox is desabled, as seen in my screenshot.

Thx for your advice, it's working well !

Regards.

0
Rumen
Telerik team
answered on 23 Jan 2020, 01:34 PM

You are welcome, Yann! Keep up the good work.

 

Regards,
Rumen
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
Tags
ComboBox
Asked by
Yann
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Zubair
Top achievements
Rank 1
Veteran
Yann
Top achievements
Rank 1
Share this question
or