I have a multi column datatable like this, datatable
I'm loading it to a combobox.
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
datatable osdat = Loaddatatable();
postOScomboBox2.DataSource = osdat;
postOScomboBox2.DisplayMember = "Product";
postOScomboBox2.ValueMember = "Product";
postOScomboBox2.SelectedIndex = -1;
}
Instead of just showing p1,p2 the combobox is also showing two extra empty rows. Same happens if i load the p1 column, 1 empty row is shown in combobox. Does display member have any property to check empty values and load only filled ones or any other way to achieve the same?