Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net DataGridView1_CellValueChanged - get this to run when ComboBox selection is made

Hi

I have a DataGridView where I add several ComboBox columns programatically.

I need to run code when a ComboBox selection is made but the event DataGridView1_CellValueChanged only runs when I click another cell.

How can I run this code without having to select another cell? Is there another event that
I should rather use?
Avatar of adriankohws
adriankohws
Flag of Singapore image

Why not you add a combo box at form level with events, then you can check the combo box index changed event.
Avatar of Murray Brown

ASKER

I can't do that in this case because the columns names have to be the same as changing data
Perhaps DataGridView1.CommitEdit is the way. What code would I use?
ASKER CERTIFIED SOLUTION
Avatar of adriankohws
adriankohws
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks very much