Skip to content

Combobox Null Filed #632

Closed
Closed

Description

@itg-assistant

John Sainsbury asked 2017-02-15 22:54:52 UTC

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.

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Thomas (ITG) answered 2017-02-16 08:09:38 UTC

    Hi John,

    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

    Thomas

  2. added
    BugSomething is broken or behaving unexpectedly.
    on Jun 12, 2026
  3. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    John Sainsbury answered 2017-02-17 05:49:44 UTC

    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.

  4. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Thomas (ITG) answered 2017-02-17 16:51:28 UTC

    Thanks, I’ll have a look at it.

  5. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Frank (ITG) answered 2017-02-24 01:01:02 UTC

    Thanks John for sending your test case.

    Both issues (WJ-8054 and WJ-8055) are fixed in the latest Wisej release (1.3.35).

    Best regards
    Frank

  6. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    John Sainsbury answered 2017-02-24 21:43:28 UTC

    Frank,

    Thank you for fixing this. I am very impressed with this platform, and have already rolled out several applications in-house.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is broken or behaving unexpectedly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions