5 Answers, 1 is accepted
0
Hello,
Thank you for writing.
Yes, RadGridView has a GridViewComboBoxColumn which cell's default editor is RadDropDownListEditor. More information regarding this column can be found here: http://www.telerik.com/help/winforms/gridview-columns-gridviewcomboboxcolumn.html.
All the best,
Stefan
the Telerik team
Thank you for writing.
Yes, RadGridView has a GridViewComboBoxColumn which cell's default editor is RadDropDownListEditor. More information regarding this column can be found here: http://www.telerik.com/help/winforms/gridview-columns-gridviewcomboboxcolumn.html.
All the best,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Hasanain
Top achievements
Rank 1
answered on 23 Jul 2012, 05:37 PM
Thank you Stefan for your answer but I can not find the ” ShowDropDown” method. excuse me!
0
Accepted
Hi Hasanain,
The method to open drop down is in the EditorElement of the RadDropDownListEditor. To use it, a cell must be placed in EditMode and then in the CellEditorInitialized event you will be able to access its RadDropDownListEditorElement and the desired method. Here is a sample where upon button click, I am placing the cell on the second row of a combo column in edit mode and I am opening its drop down:
I hope this helps.
All the best,
Stefan
the Telerik team
The method to open drop down is in the EditorElement of the RadDropDownListEditor. To use it, a cell must be placed in EditMode and then in the CellEditorInitialized event you will be able to access its RadDropDownListEditorElement and the desired method. Here is a sample where upon button click, I am placing the cell on the second row of a combo column in edit mode and I am opening its drop down:
void
radGridView1_CellEditorInitialized(
object
sender, GridViewCellEventArgs e)
{
RadDropDownListEditor editor =
this
.radGridView1.ActiveEditor
as
RadDropDownListEditor;
if
(editor !=
null
)
{
((RadDropDownListEditorElement)((RadDropDownListEditor)
this
.radGridView1.ActiveEditor).EditorElement).ShowPopup();
}
}
void
radButton1_Click(
object
sender, EventArgs e)
{
radGridView1.Rows[1].Cells[
"combo"
].BeginEdit();
}
I hope this helps.
All the best,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Hasanain
Top achievements
Rank 1
answered on 26 Jul 2012, 12:15 PM
Yes !
but why it's somuch difficult? why the name of the method is different?
any way, thank you.
0
Hi Hasanain,
I am glad that I could help.
The idea of CellEditorInitialized event is to allow you to have a one central place where you can access and modify the various editors that RadGridView cells use. As to the name of the method, I agree that it should be consistent. Basically, both call the same ShowPopup method of RadDropDownListElement, just the one in RadDropDownList is called ShowDropDown for convenience of the users.
Regards,
Stefan
the Telerik team
I am glad that I could help.
The idea of CellEditorInitialized event is to allow you to have a one central place where you can access and modify the various editors that RadGridView cells use. As to the name of the method, I agree that it should be consistent. Basically, both call the same ShowPopup method of RadDropDownListElement, just the one in RadDropDownList is called ShowDropDown for convenience of the users.
Regards,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>