The combobox closes unexpectedly automatically when the mouse is released

I came across a phenomenon that I can’t explain, and I wonder why this is happening. I hope someone can explain to me the reason, as well as how to get rid of this phenomenon:

I created several pages for the application, and then a search page. So far, so good. Whenever I tried to click on the panel itself, it opened normally, but as soon as I released the mouse button, it closed again. Except when I moved the mouse outside the area of ​​the combo box, and THEN released it. The only thing I saw was that the focus was reset automatically to the last text box in front of the list.

Self-image was a normal html combo box, while a text field was created using Html.TextBox ("search"). I also tried changing the names if I missed something in javascript but no changes.

Then I tried the following:

@Html.TextBox("search")   Kategorie @Html.DevExpress().ComboBox( settings => { settings.Name = "PrductCategory"; settings.ControlStyle.CssClass = "select"; settings.Width = 300; settings.SelectedIndex = 0; settings.Properties.DropDownStyle = DevExpress.Web.ASPxEditors.DropDownStyle.DropDown; settings.Properties.IncrementalFilteringMode = DevExpress.Web.ASPxEditors.IncrementalFilteringMode.Contains; settings.Properties.TextField = "Name"; settings.Properties.DisplayFormatInEditMode = false; settings.Properties.Native = false; settings.Properties.TextFormatString = "{0}"; settings.Properties.DisplayFormatString = "{0}"; settings.Properties.ValueField = "Id"; settings.Properties.ValueType = typeof(int); } ).BindList(Categories).GetHtml() 

It was the way it should have been all the time (although the combobox was badly formed. Since I did not learn how to format it as a “normal html” combobox, I decided to try my own mode, but more for that below). When I set the native mode to true, the same phenomenon is repeated again (with a false one, it behaves normally again). After hours of looking at tutorials and documents, I still lose completely (especially since I did not find any setfocus commands).

So my question is: Does anyone know why this can happen and how to stop this phenomenon?

Tpx

Notes:

When in the main mode and I switch through the tab in the combo box, I can view the list as usual (using the arrow keys), but I still can’t open the combo box because it closes automatically again and the focus is reset to text field ("search"), as in all other cases (except native = false).

If the main mode is set to false, and I click on the combo box, then the focus is lost (and set to a text box before the combo box [and its text box] for less than 1 second, and then set to the combo box, and combobox does NOT close) .

+6
source share
1 answer

Thomas,

It appears that some of the DevExpress settings that you use to initialize the ComboBox may cause strange behavior in the browser. Could you include a copy of what the processed control looks like from the browser source?

It might be worth removing some optional parameters, such as IncrementalFilteringMode , to see if this causes a problem.

+1
source

All Articles