Datagridview Combobox events

  • Thread starter Thread starter Dom
  • Start date Start date
D

Dom

I have a datagridview control, and one column is a ComboboxColumn. I
simply create a ComboboxColumn, add items to it, then add the column
to the Datagridview control.

If I were working with a simple ComboBox, I could capture an event
that fired everytime the selected item changed. Is that possible if
the DatagridView control?

I've looked at various events, but none give me what I want. For
example, the CellEndEdit event won't fire until after the user leaves
the combobox. I need something identical to the SelectedIndexChanged
event.

Dom
 
Dom,

The documentation for the DataGridViewComboBoxEditingControl class has
an example of how you can do exactly what you want:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.datagri...

It shows how to connect to the SelectedIndexChanged event on the
combobox that is hosted in the grid.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


I have a datagridview control, and one column is a ComboboxColumn. I
simply create a ComboboxColumn, add items to it, then add the column
to the Datagridview control.
If I were working with a simple ComboBox, I could capture an event
that fired everytime the selected item changed. Is that possible if
the DatagridView control?
I've looked at various events, but none give me what I want. For
example, the CellEndEdit event won't fire until after the user leaves
the combobox. I need something identical to the SelectedIndexChanged
event.

Thanks, Nicholas. That's exactly what I wanted.

Dom
 
pleas ... i have same problem ...the link didn't work .
can you help please ???

I have a datagridview control, and one column is a ComboboxColumn. I
simply create a ComboboxColumn, add items to it, then add the column
to the Datagridview control.

If I were working with a simple ComboBox, I could capture an event
that fired everytime the selected item changed. Is that possible if
the DatagridView control?

I've looked at various events, but none give me what I want. For
example, the CellEndEdit event won't fire until after the user leaves
the combobox. I need something identical to the SelectedIndexChanged
event.

Dom
On Thursday, October 04, 2007 12:00 PM Nicholas Paldino [.NET/C# MVP] wrote:
Dom,

The documentation for the DataGridViewComboBoxEditingControl class has
an example of how you can do exactly what you want:

http://msdn2.microsoft.com/en-us/li...forms.datagridviewcomboboxeditingcontrol.aspx

It shows how to connect to the SelectedIndexChanged event on the
combobox that is hosted in the grid.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

news:[email protected]...
 
i have same broblem ...the didnt work...can you help me in other way?

Amr
I have a datagridview control, and one column is a ComboboxColumn. I
simply create a ComboboxColumn, add items to it, then add the column
to the Datagridview control.

If I were working with a simple ComboBox, I could capture an event
that fired everytime the selected item changed. Is that possible if
the DatagridView control?

I've looked at various events, but none give me what I want. For
example, the CellEndEdit event won't fire until after the user leaves
the combobox. I need something identical to the SelectedIndexChanged
event.

Dom
On Thursday, October 04, 2007 12:00 PM Nicholas Paldino [.NET/C# MVP] wrote:
Dom,

The documentation for the DataGridViewComboBoxEditingControl class has
an example of how you can do exactly what you want:

http://msdn2.microsoft.com/en-us/li...forms.datagridviewcomboboxeditingcontrol.aspx

It shows how to connect to the SelectedIndexChanged event on the
combobox that is hosted in the grid.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

news:[email protected]...
 
Back
Top