开发者

Does anyone know of a good load-on-demand combobox for WPF?

开发者 https://www.devze.com 2023-01-01 17:17 出处:网络
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 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 ent开发者_开发问答ered 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


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 :)


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

0

精彩评论

暂无评论...
验证码 换一张
取 消