Clear ComboBox Selection on Load

3 posts, 1 answers
  1. Greg
    Greg avatar
    2 posts
    Member since:
    Jan 2013

    Posted 15 Jan 2013 Link to this post


    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?

  2. Greg
    Greg avatar
    2 posts
    Member since:
    Jan 2013

    Posted 17 Jan 2013 Link to this post

    For anyone looking for the solution, I was able to resolve this by setting the EditorControl.CurrentRow to null in the form shown event.
  3. DevCraft banner
  4. Answer
    Plamen avatar
    132 posts

    Posted 18 Jan 2013 Link to this post

    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.

    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Back to Top