ComboBox string Items and int column problem

  • Thread starter Thread starter AlanChong
  • Start date Start date
A

AlanChong

Guest
Hello all. I have a DataGridView column set to ComboBox. Column type is int. I typed the following in ComboBox's Items :

0

1

2

3

4

After the program ran. I clicked on the ComboBox and chosed a item (just any item). When the ComboBox closed., a error occurred showing something like "type dismatched". Everything in Items is a string. I couldn't type ints in Items. And the underlying column type is int. How can I let ComboBox convert its chosen string to an int when feeding to the underlying column ?

Thank you.

Continue reading...
 
Back
Top