I want to know the exact point of time, when the drop down list of a ComboBox has closed, respectively when the user has finished choosing from the list (SelectionChangeComitted).
I cannot use the CurrentCellChanged event, because this event is fired each time items from the list are selected with the keyboard's arrow keys.
I cannot use the CurrentCellEditingComplete event, because it is fired after leaving the cell.
CBClay Burch Syncfusion Team August 14, 2002 09:30 AM
The GridComboBoxCellRenderer has a DropDownContainer.CloseUp event that you can catch. To hook it, at the bottom of your Form_Load event, get a reference to the combobox cell renderer, and then use that to subscribe to this event.
Thanks, that seems to work fine.
But when would I subscribe to the CloseUp event in a grid that derives from GridControl?
The ComboBoxCellRenderer is not yet in the CellRenderers collection during construction of the grid.
CBClay Burch Syncfusion Team August 15, 2002 01:02 AM
One thing you could do is to subscribe to the grid's Paint event, and hook the CloseUp there, and also unhook the Paint event handler. This way the Paint event handler is only executed once.
public class MyGridControl : GridControl
this.Paint += new PaintEventHandler(HookDropDown);
private void HookDropDown(object sender, PaintEventArgs pe)
GridComboBoxCellRenderer cbb = (GridComboBoxCellRenderer) this.CellRenderers["ComboBox"];
cbb.DropDownContainer.CloseUp += new PopupClosedEventHandler(ComboBoxClosed);
Console.WriteLine("HookDropDown - should see only once");
this.Paint -= new PaintEventHandler(HookDropDown);
private void ComboBoxClosed(object sender, PopupClosedEventArgs e)