I'm using a combobox with the property DropDownStyle set to DropDownList. The combo is data-bound to a dataset with two colums: ID, Name and it contains the following records:
ID Name
1 A
2 B
3 C
5 D
The DisplayMember property is mapped to "Name" column and the ValueMember property is mapped to "Id" column.
Everytime I try to set the SelectedValue of the combo to the value 1, the execution crashes showing the following error message:
Specified argument was out of range of valid values. Parameter name: '-2147483648' is not a valid value for 'index'.
The is no problem setting the SelectedValue to 2 or 5 or anything else. I have also a second combo with exactly the same parameters and data-binding on the form, and the is no problem with it.
Any ideas?
ID Name
1 A
2 B
3 C
5 D
The DisplayMember property is mapped to "Name" column and the ValueMember property is mapped to "Id" column.
Everytime I try to set the SelectedValue of the combo to the value 1, the execution crashes showing the following error message:
Specified argument was out of range of valid values. Parameter name: '-2147483648' is not a valid value for 'index'.
The is no problem setting the SelectedValue to 2 or 5 or anything else. I have also a second combo with exactly the same parameters and data-binding on the form, and the is no problem with it.
Any ideas?
Last edited: