tags:

views:

114

answers:

2

I have been searching for a while now, and have not been able to find a load-on-demand combo box that populates itself depending on what is typed in the combo-box. I also have a requirement that an item in the list must be selected (i.e.: free text can be entered but not "selected" - only a "search result" can be selected from the list in the combo box.

The scenario is as follows : there is a text box/combo box where someone enter the first 2 or 3 characters, a web service is called which queries a database and then populates the combo box.

Are there any controls or code example that anyone knows of? Or alternatively another way to implement this?

Here is a link to an asp.net control that has this functionality: http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx

A: 

Telerik combobox with autocomplete will be what you are looking for.

VoodooChild
The Telerik combobox has support for autocomplete, not for load on demand. the auto complete only works for items already bound to the combobox.
Eli Perpinyal
+1  A: 

use the event "textchanged" to dynamicly add/remove items :)

updated :

why not bind the results to observable collection and databind that to the combo box , so on chnage > query database > bind items to the collection , .net automatilcy updates the items , this might work :)

Aviatrix
Tried that, but when you select an item on the list, the text changes, confuses the hell out of the combobox.I might have to implement a custom control...
Eli Perpinyal
updated the answer
Aviatrix
I have tried binding it to an observable collection, but as I said before the text changes and that rebinds the text and refreshes the collection.
Eli Perpinyal