This is a migrated thread and some comments may be shown as answers.

GridViewComboBoxColumn - DropDownArrow click event

1 Answer 128 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 15 Apr 2013, 08:41 AM
Hello guys,

in my GridView i have a ComboBoxColumn. Is it possible to fire an event when someone clicks on the DropDownArrow ? In addititon the DropDownList should not open because i want to open a new form to select values.

thanks in advance

Markus

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 18 Apr 2013, 06:52 AM
Hi Markus,

Thank you for writing.

Before getting to your question I would like to discuss your license with you. Please note, that in order to continue receiving support from Telerik representatives, you have to be added as Licensed developer to an active license with support subscription. I can see that in your account you have such a license and it is assigned to d.neetix@grolman-group.com. If you are also working with our controls, you should consider a purchase of an additional license, and assign yourself as license developer to it.

I have converted this forum thread into a support ticket in order to prevent disclosure of private information. You can find it in your Telerik account.

As to your question at hand, you can use the CellEditorInitialized event, where you can access the editor of the combo column. Once you access it, you can use its PopupOpening event to prevent the opening of the dropdown, and use the Click event of the ArrowButton to open your form:
void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    if (e.Column.Name == "ComboColumn")
    {
        RadDropDownListEditor editor = (RadDropDownListEditor)e.ActiveEditor;
        RadDropDownListEditorElement element = (RadDropDownListEditorElement)editor.EditorElement;
        element.PopupOpening += element_PopupOpening;
        element.ArrowButton.Click += ArrowButton_Click;
    }
}
 
void ArrowButton_Click(object sender, EventArgs e)
{
    //do smth
}
 
void element_PopupOpening(object sender, CancelEventArgs e)
{
    e.Cancel = true;
}

I hope that you find this information useful. Let me know if you have any other questions.
 
Regards,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.

Tags
GridView
Asked by
Markus
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or