Bonnie, you are right
As I've posted the DataBindings.Add method, I was linking the combo
values to the dataset field, and those values do not get initialized when you load the combo via .AddRange
The correct form of the DataBindings.Add, in my posted example, would be
comboBox1.DataBindings.Add(
new System.Windows.Forms.Binding(
"SelectedItem", myDataSet, "Employee.Prefix"));
The difference is "SelectedItem" instead of "SelectedValue"; this works because the Items collection is populated by the AddRange method.
Thanks for the comment,
Jose
>Jose,
>
>For some reason, I've had trouble doing this (coded it exactly like you show, except C# instead of VB). It just wouldn't databind, so I ended up creating a DataSet and filling my combo from that. That worked.
>
>~~Bonnie
>