I am using combo boxes to display mandatory lists of data. The user must select an item, and it cannot be blank. An example is say state of Australia, such as QLD for Queensland. No matter what, there must be a state. When the form is initialised, generally selected index is defaulted to zero. The combo box is DropDownList. so only those items can be selected. The problem seems to be the user can select a null value instead of a mandatory field. This is not the behavior of the same component in windows forms. Also, if a combobox has the collection cleared, then repopulated by adding items, index zero references the null field, even though it is not in the list. I want to keep using the combobox, so the look and feel, as well as functionality is the same as the windows forms. The behavior was correct in VWG as well.
Thanks John for sending your test case.
Both issues (WJ-8054 and WJ-8055) are fixed in the latest Wisej release (1.3.35).
I have attached a sample application. I included a button for removing items, and repopulating. This project was created with VS2015. The only recent change to my environment was to install VS2017 RC. I am using version 1.3.27. I will be able to test on my other machines over the weekend, to determine if it is my environment or not.
I tried to replicate what you describe but I cannot reproduce this. For me the Wisej ComboBox behaves identical to WinForms in terms of handling the SelectedIndex property with the type set to DropDownList. Deleting the items collection resets the index back to -1.
When a form initializes with an empty combobox, the SelectedIndex is set to -1 by default, not zero.
Can you send me a small test case that illustrates the problem?
Thanks in advance
Please login first to submit.