pointeman
asked on
Combobox Empty Rows Prevention?
Q. Anyone know how to fill a ComboBox without empty rows?
I'm using a dataset and sorting the Combobox like so:
comboBox1.Sorted = true;
foreach (DataRow row in dataSet1.Tables[0].Rows)
{
comboBox1.Items.Add(row["L astName"]) ;
}
I'm using a dataset and sorting the Combobox like so:
comboBox1.Sorted = true;
foreach (DataRow row in dataSet1.Tables[0].Rows)
{
comboBox1.Items.Add(row["L
}
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
if (!string.IsNullOrEmpty(row
comboBox1.Items.Add(row["L