I have a requirement in a web application to duplicate the winforms combobox, with both the ability to select from the drop down list and to type text into the control. I've been looking at the AjaxControlToolkit combobox control since it gives the two behaviours along with other nice things like autocomplete.
This is working fine but I have found two very annoying bugs related to the focus behaviour that I can't see a good work around for.
The first has been documented on Codeplex and set as a low priority bug for a future release. The bug is that if you change the forms focus (say click on another control) while the combobox dropdown list is shown, the list will not close.
The second bug, which I've not found documented any where in this exact form relates to the focus of the form on postback. To allow the control to handle user typed text I am handling the OnItemInserted event in the code behind and manipulating the bound list. If the user types into the combobox text and then mouse clicks off the combobox into another control like a text box, the focus of the form is lost on postback.
I've done a bit of investigation and found work arounds for ASP.Net postback focus behaviour like the one here as well as using the Page.SetFocus() or ScriptManager.SetFocus() methods. Neither approach seems to work in this scenario and I think it is because the combobox control is setting its own focus during postbacks.
Has anyone had experience with these two issues and found satisfactory solutions? I'm hoping to avoid opening up the AjaxControlToolkit source and making my own implementation of the control but have run out of other options.