I have a tab strip I use to switch between screens. Some of the screens have drop down selection boxes on them. I like that the selection stays while user is using the screen. If they select a tab and come back it is still at last selection. I would like it to go back to the default of “Select Value” either on exit of screen or entry into screen. I do not see where to do this…Grrrrrr
If you set an expression binding on the Selected Value property of the dropdown list, it will be evaluated every time the screen is opened. The expression “-1” (without the quotes) will return it to each time.
Let’s say we are using this dropdown for a filter. The dropdown is correctly populated buy whatever dataset is assigned. When you first come to the page the “” text is in the dropdown and nothing is filtered. If you change to an item in the dropdown the filter works using the newly selected value. The problem is that I can’t find a way to reset/reselect an empty/"" value unless I leave the page and return.
Is there a way to add this empty Selected String Value to the dropdown list?
I had the same question as the OP, with the selected value not resetting when leaving. I posted here because I wanted to take the same question one step farther.
There are two ways you can get back to the ‘’ state.
You can add a button to the right of the dropdown list that sets the selectedValue to -1 which clears the selection.
If the data property is bound to a SQL query you can add a ‘’ state to it like this:
SELECT -1 AS ID, '<Select One>' AS Label UNION SELECT col AS ID, col2 AS Label FROM table ORDER BY ID ASC, Label ASC
I used option “1”. The users liked it, they have more control of when things get cleared.