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

Suppress Combobox Drop Down when Setting the Text

1 Answer 86 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeremy Murtishaw
Top achievements
Rank 1
Jeremy Murtishaw asked on 08 Jul 2009, 08:49 PM
Hello,

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 + "]";
                cboRecord.CloseDropDown();
                cboMasterfile.Text = Sands.GetFullMasterfile(psMasterfile);
                cboMasterfile.CloseDropDown();

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.

Thanks!
Jeremy

1 Answer, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 13 Jul 2009, 08:42 AM
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,
Victor
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.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Jeremy Murtishaw
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or