How to Solve the inner Exception i.e. index out of range

Posted by narmadha on Stack Overflow See other posts from Stack Overflow or by narmadha
Published on 2010-03-29T11:26:22Z Indexed on 2010/03/29 11:43 UTC
Read the original article Hit count: 219

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms