How to select (and display selection in cell) a value from a DataGridViewComboBoxColumn.
Posted on 2012-04-12
I am a developer who is new to the DataGridView object. I have a task to modify an existing DataGridView object (myDGView), so that one of the columns displays a certain value under specific circumstances. There are two columns in myDGView: unit and association. Unit is a DataGridViewTextBoxColumn and association is a DataGridViewComboBoxColumn. The values of association are binded to a database lookup table (Values are: "X", Y", Z"). When the user changes the value of unit (column 0), I need to check all of the rows in the myDGView to determine if any association (column 1) value = "X". If not, I must display "X" as the default selected value for the association column of the current row. Can anyone assist?