client side:ComboBox: Select item in disabled comboBox

4 posts, 0 answers
  1. Taraman
    Taraman avatar
    17 posts
    Member since:
    Aug 2010

    Posted 03 Jan 2011 Link to this post

    Hello Telerik,
    I have a problem when dealing with RadComboBox.
    if the comboBox is disabled, and I want to select an item it doesn't work

    the following not working:


    the problem is the combo may be disable or not before selecting item so I make the following workaround

    if (!ComboBoxTitle.get_enabled()) {
    else {
    but I am asking if there are a better solution

  2. Kalina
    Kalina avatar
    918 posts

    Posted 04 Jan 2011 Link to this post

    Hello Taraman,

    When a RadComboBox control is disabled - you are not able to select an item in it.
    This behaviour is correct and is by design.
    That is why you are on the right way with the approach that you use.

    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. Thad
    Thad avatar
    106 posts
    Member since:
    Sep 2010

    Posted 22 Dec 2011 Link to this post

    Hi Karina,

    May I ask the reason for this design decision?  Why do you not allow an item to be selected in a disabled RadComboBox?  That seems very counter-productive, and I spent several hours today trying to figure out why some JavaScript was not working as expected.

    Here is the code from your library which clearly illustrates that the select code is not firing if the ComboBox is disabled...
    _select: function (h) {
        if (!this.get_isEnabled() || this.get_isSeparator()) {
        } var c = this.get_comboBox();
        if (c.raise_selectedIndexChanging(this, h) == true) {
        } var i = c.get_text();
        var g = c._getLastSeparatorIndex(i);
        var j = i.substring(0, g + 1) + this.get_text();
        var d = c.get_selectedItem();
        if (d) {
        } c.set_text(j);
        c.raise_selectedIndexChanged(this, h);
        var f = { Command: "Select", Index: this.get_index() };

    Thanks for helping me understand.

    Happy Holidays!
  4. Kalina
    Kalina avatar
    918 posts

    Posted 28 Dec 2011 Link to this post

    Hi Thad,

    Can you explain the scenario that you want to implement in more details?
    Why do you need to set a selected item within a disabled RadComboBox?
    Maybe with more details about your implementation we will be able to suggest you a solution?

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top