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

Clear ComboBox Selection on Load

2 Answers 265 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 15 Jan 2013, 02:01 PM
Hi,

I am using several MultiColumn ComboBoxes in a Windows Form, and would like the combo boxes to have nothing selected when the form is first loaded.  The boxes will not have any text in them, and the user will have to use the drop down to select a row.  Once a row has been selected, the box will show the first column of the selected row.

I have tried using the ClearSelection() method on the EditorControl of the combobox, in both the form shown and form load methods, but the combo box still shows the first record when it loads. 

Any suggestions?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Greg
Top achievements
Rank 1
answered on 17 Jan 2013, 03:07 PM
For anyone looking for the solution, I was able to resolve this by setting the EditorControl.CurrentRow to null in the form shown event.
0
Accepted
Plamen
Telerik team
answered on 18 Jan 2013, 07:03 AM
Hi Greg,

Thank you for writing.

I can confirm that setting the CurrentRow to null is the right way to go. 
radMultiColumnComboBox1.EditorControl.CurrentRow = null;

The ClearSelection() method clears the current selection by deselecting the selected rows.

Should you have further questions, I would be glad to help.

Greetings,
Plamen
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
MultiColumn ComboBox
Asked by
Greg
Top achievements
Rank 1
Answers by
Greg
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or