Nullable Combobox?

Editors for WPF Forum

The latest build of this product (v2019.1 build 0683) was released 2 months ago, which was before this thread was created.
Posted 2 months ago by eric
Version: 19.1.0683
Avatar

Hi all,

i was wondering if actipro have any control or any plans to have a nullable combobox?

Im looking for a combobox that would allow to pass Null to a binding.

  • Pressing Delete would clear the selection
  • Maybe have X button to clear the selection
  • Have a 'None' item in the combobox, when selected it would be equivalent to Nothing.

This would be quite useful to have. Currently the alternatives are hard to implement.

Comments (2)

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Eric,

We don't have anything in the plans at this moment for that.  

What if you just added null to your ItemsSource and had some value converter used in your item DataTemplate's TextBlock.Text that would show "(null)" if the incoming value was null?  That might accomplish what you want.

I also saw this resource online where someone made one in a different way:  https://bits.strawjackal.org/80


Actipro Software Support

Posted 2 months ago by eric
Avatar

Well editing the collection in the model or in the viewmodel would of course work but is quite a waste of time since it could be automatically managed by such a control.

I did find a way to achieve what i wanted using some converters, however i am sure that such control would be quite useful to have and would bring value to actipro's control library.

60%+ of my combobox in my application are bound to a field which can be null.

Thank you for the reply!

[Modified 2 months ago]

Add Comment

Please log in to a validated account to post comments.