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

Disabling text input in combobox

1 Answer 628 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Miguel
Top achievements
Rank 1
Miguel asked on 21 Jul 2011, 03:09 PM
Hi fellas
I'm trying to use some nested combo boxes and want to disable the ability of writing text in the combo box 'cause if invalid text is written it will break my app.  Now I know validation might work but my clients desire is to completely disable this behaviour (I prefer it this way as well).  I've been looking at the AllowCustomText property but changing its value has done nothing, dunno why... any help will be greatly appreciated, thanks :)

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 21 Jul 2011, 05:25 PM
Hello Miguel,

You can try to forbid user typing in RadComboBox input by handling the OnClientLoad event in this way:
<telerik:RadComboBox ID="RadComboBox1" runat="server"
    OnClientLoad="OnClientLoadHandler" . . . >

function OnClientLoadHandler(sender) {
    sender.get_inputDomElement().readOnly = "readonly";
}


Regards,
Kalina
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
ComboBox
Asked by
Miguel
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or