Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
strange exception with Combo editor
posted

hello there,

I got "ex = {"Input string was not in a correct format."} exception when I try to assign "SelectedIndex". my function is like:

...

private void LoadCboProduct()

{

try

{

foreach (int val in Enum.GetValues(typeof(ProductName)))

{

cboProduct.Items.Add(
new Infragistics.Win.ValueListItem(val, Enum.GetName(typeof(ProductName), val)));

}

cboProduct.SelectedIndex = 0; //GOT EXPCETION HERE.

}

catch (Exception ex)

{

MessageBox.Show(ex.Message.ToString());

}

 

...

 And I can only get once for each debug....

Any idea on this?

  • 37774
    posted

    I just tested our your code and it works fine for me (though I naturally had to define my own ProductName enum).  The first thing I would do is to ensure that you have the latest hotfix, which can be found on the My Keys & Downloads page.  If it still happens, you should submit an issue to Developer Support.

    If you post the call stack, or possibly what else you're doing, I might be able to point you in the right direction as well.

    -Matt