New to Telerik UI for WinForms? Start a free 30-day trial
How to Open DropDownList editor in RadGridView with a Single Click
Updated over 6 months ago
Environment
| Product Version | Product | Author |
|---|---|---|
| 2021.1.122 | RadGridView for WinForms | Desislava Yordanova |
Description
When you click a cell in RadGridView, it gets selected. When you click the same cell again, it enters edit mode. In case a RadDropDownListEditor is activated, you will need to click once again the arrow button to open the pop up. This article demonstrates how to activate the editor and open the drop down with just a single click.
| Default behavior | Improved behavior |
|---|---|
![]() | ![]() |
Solution
The CellEditorInitialized event is appropriate for forcing the drop down once the editor is being activated and initialized. Please have a look at the below code snippet:
C#
private void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
RadDropDownListEditor editor = e.ActiveEditor as RadDropDownListEditor;
if (editor!=null)
{
RadDropDownListEditorElement el = editor.EditorElement as RadDropDownListEditorElement;
el.ShowPopup();
}
}

