Hy.
I have a little problem with a comboBox on my form, and i want to ask if anyone could help me. I'm writing a DB application and i am populating my comboBoxes with an ArrayList object and a DataReader object, like this:
[CODE=vbnet]
dataReader = sqlCmd.ExecuteR eader();
while (dataReader.Rea d())
{
arrList.Add(dat aReader["clientName "]);
}
clientComboBox. DataSource=arrL ist;
dataReader.Clos e();
dataReader = null;
arrList.RemoveR ange(0, arrList.Count);
[/CODE]
My problem is this: the first time i select an option from the comboBox, the selected text is not displayed, but after that, it work fine. How can i fix this?
Thank you.
I have a little problem with a comboBox on my form, and i want to ask if anyone could help me. I'm writing a DB application and i am populating my comboBoxes with an ArrayList object and a DataReader object, like this:
[CODE=vbnet]
dataReader = sqlCmd.ExecuteR eader();
while (dataReader.Rea d())
{
arrList.Add(dat aReader["clientName "]);
}
clientComboBox. DataSource=arrL ist;
dataReader.Clos e();
dataReader = null;
arrList.RemoveR ange(0, arrList.Count);
[/CODE]
My problem is this: the first time i select an option from the comboBox, the selected text is not displayed, but after that, it work fine. How can i fix this?
Thank you.
Comment