Suppress Combobox Drop Down when Setting the Text

Thread is closed for posting
2 posts, 0 answers
  1. Jeremy Murtishaw
    Jeremy Murtishaw avatar
    86 posts
    Member since:
    Apr 2009

    Posted 08 Jul 2009 Link to this post


    I'd like to suppress the dropdown from opening when I change the Text property of my combobox. Presently, I'm doing:

                    cboRecord.Text = psName + " [" + psID + "]";
                    cboMasterfile.Text = Sands.GetFullMasterfile(psMasterfile);

    But when this executes, you still see the dropdown open and then immediately close, which looks buggy. Is there any way to avoid having it open altogether? I've tried disabling the control before and enabling after, but that does not work.

  2. Victor
    Victor avatar
    1358 posts

    Posted 13 Jul 2009 Link to this post

    Hello Jeremy Murtishaw,

    You can achieve this behavior by using a boolean flag. You set this flag to true while editing the text and when you are done, you set it to false. Then in the PopupOpening event you check for this flag and cancel the opening of the drop down. You can access the PopupOpening event through the ComboBoxElement property of RadComboBox.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top