In a Windows Application I have a Combobox
in a DataGridView
.
My question is:
How do I get the value at the first index as default?
For example, if the ComboBox
Status has three values
- unknown (1)
- accepted (2)
- rejected (3)
the value unknown
is at the first index and should be selected as default in the DataGridView
cell. The ComboBox
's text should be set programmatically by index, e.g. by cbbox.selectindex = 1;
How can the first index's text be displayed by default in the DataGridView
?