Datagridview Combobox events

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
 
D

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
 
A

Amr yaseen

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]...
 
A

Amr yaseen

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]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top