Edit this page

Number of clicks in the ComboBox column

PROBLEM

If you have a GridViewComboBoxColumn in your gridview, then by default, you need to click three times in order to show the dropdown - the first click selects the current cell, the second enters edit mode and the last one will opens the list.

The following solution will give you options to control the number of clicks needed to change the value of the combobox column.

SOLUTION

2 clicks solution

By configuring EditTriggers="CellClick" property of GridViewComboBoxColumn the cells will enter edit mode with a single click only. Now you will need one more click to show the drop down and select a value.

1 clicks solution

In addition to configuring EditTriggers="CellClick" property, you can set OpenDropDownOnFocus property of the editor (RadComboBox).

This could be done in XAML by applying a Style targeting RadComboBox element as an EditorStyle of the column. For example:

XAML

<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding ClubID}"
                            SelectedValueMemberPath="ID"
                            EditTriggers="CellClick"
                            DisplayMemberPath="Name"
                            ItemsSource="{Binding Clubs}">
    <telerik:GridViewComboBoxColumn.EditorStyle>
        <Style TargetType="telerik:RadComboBox">
            <Setter Property="OpenDropDownOnFocus" Value="True"/>
        </Style>
    </telerik:GridViewComboBoxColumn.EditorStyle>
</telerik:GridViewComboBoxColumn>

If you're using Implicit Styles, you should base your style on the RadComboBoxStyle.

See Also