
joseph_korn
Top achievements
Rank 1
joseph_korn
asked on 15 May 2008, 09:20 PM
I am wondering if it is possible to have a GridViewComboBoxColumn that when clicked on, will automatically dropdown the list of choices for you to choose from (This saves one click when you are clicking many comboboxes in one go)? I imagine you would run the dropdown code in the CellBeginEdit event.. I am just not sure exactly how to accomplish this..
5 Answers, 1 is accepted
0
Accepted
Hi Joseph,
Thank you for the question.
You can show the drop down on first click by using RadComboBoxEditor's ShowDropDown() method in the CellEditorInitialized event. Please, review the following code-block:
I hope this helps. If you have other questions, do not hesitate to contact me again.
Greetings,
Martin Vasilev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for the question.
You can show the drop down on first click by using RadComboBoxEditor's ShowDropDown() method in the CellEditorInitialized event. Please, review the following code-block:
private void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e) |
{ |
if ((this.radGridView1.ActiveEditor != null) && |
(this.radGridView1.ActiveEditor is RadComboBoxEditor)) |
{ |
(this.radGridView1.ActiveEditor as RadComboBoxEditor).ShowDropDown(); |
} |
} |
I hope this helps. If you have other questions, do not hesitate to contact me again.
Greetings,
Martin Vasilev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Marina Vision
Top achievements
Rank 1
answered on 14 Jun 2010, 07:56 AM
This command doesn't work anymore:
I'm using Releases Q1-2010.
Was it replaced with a new command?
Thanks,
Marina
(this.grdItems.ActiveEditor as RadComboBoxEditor).ShowDropDown(); |
Was it replaced with a new command?
Thanks,
Marina
0
Hi Marina Vision,
Thank you for writing.
In Q1 2010 release we have introduced a different editor structure and the implementation of the Auto-DropDown should be done in a different way, namely, by with using a custom combo-box editor. Please consider the following code snippet:
Let me know if you have any additional questions.
Kind regards,
Martin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thank you for writing.
In Q1 2010 release we have introduced a different editor structure and the implementation of the Auto-DropDown should be done in a different way, namely, by with using a custom combo-box editor. Please consider the following code snippet:
void
radGridView1_EditorRequired(
object
sender, EditorRequiredEventArgs e)
{
if
(e.EditorType ==
typeof
(RadComboBoxEditor))
{
e.Editor =
new
CustomComboEditor();
}
}
class
CustomComboEditor : RadComboBoxEditor
{
public
override
void
BeginEdit()
{
base
.BeginEdit();
((RadComboBoxEditorElement)
this
.EditorElement).ShowPopup();
}
}
Let me know if you have any additional questions.
Kind regards,
Martin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0

Jimmy
Top achievements
Rank 1
answered on 27 Jun 2018, 01:39 PM
I am trying to use a GridViewComboBoxColoumn in my Winform Application and I want to eliminate the 3 clicks it takes to select a value in the combo.
Can I subscribe to an event and automatically show the combo?
Thanks for your help,
Jimmy Voegele
0
Hello, Jimmy,
In order to show the popup immediately after activating the editor you can use the following code snippet when handling the RadGridView.CellEditorInitialized event:
In addition, you can subscribe to the CellClick event and force entering edit mode:
Thus, only with a single click, you can activate the editor and show the drop down.
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
In order to show the popup immediately after activating the editor you can use the following code snippet when handling the RadGridView.CellEditorInitialized event:
private
void
radGridView1_CellEditorInitialized(
object
sender, GridViewCellEventArgs e)
{
RadDropDownListEditor ddl = e.ActiveEditor
as
RadDropDownListEditor;
if
(ddl!=
null
)
{
RadDropDownListEditorElement el = ddl.EditorElement
as
RadDropDownListEditorElement;
el.ShowPopup();
}
}
In addition, you can subscribe to the CellClick event and force entering edit mode:
GridViewComboBoxColumn comboCol =
new
GridViewComboBoxColumn(
"CategoryName"
);
comboCol.DataSource =
this
.categoriesBindingSource;
comboCol.ValueMember =
"CategoryID"
;
comboCol.DisplayMember =
"CategoryName"
;
comboCol.FieldName =
"CategoryID"
;
comboCol.Width = 200;
this
.radGridView1.Columns.Add(comboCol);
private
void
radGridView1_CellClick(
object
sender, GridViewCellEventArgs e)
{
if
(e.Column.HeaderText ==
"CategoryName"
)
{
this
.radGridView1.BeginEdit();
}
}
Thus, only with a single click, you can activate the editor and show the drop down.
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.