views:

733

answers:

1

I have a combobox control hosted in a unbound DataGridView control. When the user selects an item (or types an entry and hits enter) I want it to apply the change and come out of edit mode.

Is this possible?

+2  A: 

On the CurrentCellDirtyStateChanged event of your DataGridView, you can call the following code:

myDataGridView.EndEdit(DataGridViewDataErrorContexts.Commit)
Meta-Knight