0
votes

I have a combo box wherein I am feeding in items in drop down box. Apart from this I also want my combo box to accept the values I feed from my keyboard. When I write anything in the combo box then I get this exception message:

InvalidArgument=Value of '-1' is not valid for 'index'.
Parameter name: index

It should display a list of items in list box from the index I gave in combo box 1 to combo box 2.

How to do this?

2
yea..it is editable already.Just that whenever i write something i get exception - ghd

2 Answers

0
votes

The combobox has a DropDownStyle property. This property change the behaviour of the combbox in runtime. Check if you can set a value in this property that matches the behaviour that you want.

Other option could be using an AutoComplete TextBox/Combobox. Here is a link with info about how to do it.LINK. It is preyty easy.

0
votes

For this to happen, you need to capture the TextChanged event of the combo box and write the appropriate event handling code to populate the second list box.