Datagridview execute code on change of the column combo box value
-
13-01-2021 - |
Question
I am trying to reload the datagridview on change of the combobox value in on of that datagridview columns. I know how to do the reload, but I am having trouble triggering the action. Should I be looking for value change in this particular cell or is there a change in comobobox action?
Solution
I typically use ComboBox_TextChanged events and you can use those within a datagridview as well, as you add them:
comboBox1.TextChanged += delegate(object sender, EventArgs e) { // Do Whatever }
OTHER TIPS
Do a DataGridView1.Refresh() on the combobox change event.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow