tags:

views:

28

answers:

2

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?

A: 

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.

Jonathan
there is none. i tried simple, dropdown and dropdownlist. none working. currently i am using dropdown.
ghd
I dont need auto complete. I need to input my own values. Thanks!
ghd
A: 

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.

Mamta Dalal