DataGridComboBoxColumn open combo on edit

Nov 5, 2008 at 10:21 PM
Hi, currently the user has to click the cell to select the cell, click again to see the combo box and then click for the third time to get the combo box to drop down.

Anyone know of a way (in code) of automatically opening the combo on the edit click?

Nov 6, 2008 at 1:20 AM
Edited Nov 6, 2008 at 1:21 AM
The following should open the dropdown of combobox when ever it gets into edit mode. You can do something similar in the code if you want...

    <toolkit:DataGridComboBoxColumn ...>


                        <Style TargetType="{x:Type ComboBox}">

                            <Setter Property="IsDropDownOpen" Value="True"></Setter>



Nov 6, 2008 at 1:30 AM
Additionally, you could do that single click editing hack in the tips and tricks.  Along with what Vamsee is saying, it should open the dropdown on a single click even when it's not in editing mode.
Nov 6, 2008 at 8:18 AM
Thanks very much. I added the following code and it works a treat...


Dim lobjPropSetter As New System.Windows.Setter(System.Windows.Controls.ComboBox.IsDropDownOpenProperty, True)



Dim lobjComboBoxColumnStyle As New Style(GetType(System.Windows.Controls.ComboBox))




Me.EditingElementStyle = lobjComboBoxColumnStyle


Feb 14, 2012 at 4:43 PM

Hi amitchel,

I am a newbie to c# environment and i am in a situation to do exactly the same as you did in my code, may i know where to add the above code in order to achieve this.

Thanks in advance