Nullable ComboBox

0
0

Hello,

it would be nice if it would be possible to have a Nullable ComboBox. Maybe enabled by a Property. If you set a DataSource it will automatically add a null option in the DropDown. As an additional property a NullValueText would be nice so we show different text like “”, “(none)” or “(empty)”.

best regards

Bernhard

  • You must to post comments
0
0

The data binder position is in sync with the SelectedIndex unless it’s -1. We can’t add an item 0 and make it act as -1, it would create too may potential problems.

You can also add a tool button to the ComboBox to set it to “null”, SelectedIndex = -1. See screenshot attached. Most controls in Wisej have the Tools property.

screen

The Watermark text is shown when nothing is selected when the combo is editable.

  • You must to post comments
0
0

Thank you for your reply.

With this solution it is not possible for the user to select null in the dropdown or am I missing something?

  • You must to post comments
0
0

When the ComboBox is DataBound you can set SelectedIndex to -1, make sure that the combobox1.FormattingEnable property is true.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.