Combobox non-selectable empty space\intermitently auto-selects top value on Loaded event

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
TaterJuice
Posts: 21
Joined: Thu Mar 16, 2017 5:40 am

Combobox non-selectable empty space\intermitently auto-selects top value on Loaded event

Postby TaterJuice » Mon May 01, 2017 3:11 am

The combobox loads with an empty space at the top of the items list, yet this space can't be selected, and upon loading, SOMETIMES, but not all the time, the combobox automatically selects the first real value in the list, skipping over the empty item (and failing to trigger a property changed notification).
When this happens, I can't make the propertychanged notification by re-selecting the top item that is already selected without first changing the selection first, then re-selecting the first item.

What can I do to either remove the empty, unselectable space from the top of the items list in a combobox, or make that space selecteable, so a user can de-select the currently selected item? In normal WPF\XAML you can set the SelectedItem = null or SelectedIndex = -1, but the CsHTML5 Combobox still randomly auto-selects the first value in the ItemsSource on Loaded - but not after that. It only intermittently exhibits this behavior during or directly after the Loaded event.

I'm working on a way to reproduce this behavior reliably but its very intermittent :-/

Ultimately though, All I want is to either a) make the "empty" space a selectable item that clears the selected value, or b) hide the empty space, so I can add my own "Empty" option. Can this be done?

Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 3 guests