DayLaborer
Programmer
I'm working on a Winforms app. I have been Googling and Googling and cannot find the answer to what appears should be a very simple answer - I would think.
I have a DataGridViewComboBoxCell that I get from this:
I need to get the ComboBox contained within so I can hook an event onto it. I cannot find a way to cast the above object - or use its properties - to get the ComboBox I need.
This is especially strange considering:
[ol][li]This "DataGridViewComboBoxCell" is a container designed specifically for a ComboBox. Shouldn't there be some property to expose the ComboBox that's always contained within?![/li]
[li]The method that I'm inside of is:
and I cannot seem to get the ComboBox from neither "sender" nor the eventargs. When I was in method
I was able to get it like this: ComboBox comboBox = e.Control as ComboBox;[/li][/ol]
Help, please!...
Thanks,
Eliezer
I have a DataGridViewComboBoxCell that I get from this:
Code:
DataGridViewComboBoxCell notGoodEnough = (((DataGridViewComboBoxCell)(dgvForms[e.ColumnIndex, e.RowIndex])));
This is especially strange considering:
[ol][li]This "DataGridViewComboBoxCell" is a container designed specifically for a ComboBox. Shouldn't there be some property to expose the ComboBox that's always contained within?![/li]
[li]The method that I'm inside of is:
Code:
private void dgvForms_CellEnter(object sender, DataGridViewCellEventArgs e)
Code:
private void dgvForms_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
Help, please!...
Thanks,
Eliezer