I have a combobox which gets populated here on Form_Load.
cboPerson.DataSource = dsGetPersons.Tables(0)
cboPerson.DisplayMember = "FullName"
cboPerson.ValueMember = "PersonID"
After the user selects a name from the list, I need to fill some textboxes with the name.
If I use the cboPerson_SelectedIndex_Changed event, this event fires and errors during form loading on this event while passing the value to a parameter with
"Conversion from type 'DataRowView' to type 'Integer' is not valid."
If I use the cboPerson_SelectionChangeCommitted event instead, it loads fine, and works when the combobox is used with the mouse, but not when a name is typed in and Autocomplete occurs.
I really want Selected_Index_Changed, but this error must be common, right? Am I missing something to get it to work properly? I could probably use the Leave event, but this is definitely less than ideal.
Using Visual Studio 2005.
TIA
cboPerson.DataSource = dsGetPersons.Tables(0)
cboPerson.DisplayMember = "FullName"
cboPerson.ValueMember = "PersonID"
After the user selects a name from the list, I need to fill some textboxes with the name.
If I use the cboPerson_SelectedIndex_Changed event, this event fires and errors during form loading on this event while passing the value to a parameter with
"Conversion from type 'DataRowView' to type 'Integer' is not valid."
If I use the cboPerson_SelectionChangeCommitted event instead, it loads fine, and works when the combobox is used with the mouse, but not when a name is typed in and Autocomplete occurs.
I really want Selected_Index_Changed, but this error must be common, right? Am I missing something to get it to work properly? I could probably use the Leave event, but this is definitely less than ideal.
Using Visual Studio 2005.
TIA