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
2010-08-20 07:58:53
there is none. i tried simple, dropdown and dropdownlist. none working. currently i am using dropdown.
ghd
2010-08-20 08:03:41
I dont need auto complete. I need to input my own values. Thanks!
ghd
2010-08-20 08:16:21
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
2010-08-20 08:00:48