I am storing items into a combo box which had been retrieved from the database in the following manner:
cmbCustomerName.DataSource = null;
cmbCustomerName.DataSource = result;
cmbCustomerName.ValueMember = "CustomerID";
cmbCustomerName.DisplayMember = "CustomerName";
cmbCustomerName.Text = null;
Its working, but often showing the inner exception "Index Out of Range". Why does this error occur?