Initially nothing is selected from the list; then user selects something from the list and it is saved in the database. When user tries to Edit there is no option to deselect everything from the list. How do I let user deselect everything from the list?
Just found it since it is multi select list box, user can deselect items from list box by clicking Ctrl key.
I'm glad that you have solved the issue by yourself.
For user-friendliness,I suggest you could add some tips to let users know how to deselect.
And you could also mark the right reply as answer.
This will help other people who faces the same issue.
Thank you very much.
Best Regards.
Yuki Tao
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
55 Points
448 Posts
Deselect everything from the ListBox in Edit View
Jan 23, 2019 12:27 PM|joegreen2005|LINK
Hi there,
I have a multi-select list box like this.
Initially nothing is selected from the list; then user selects something from the list and it is saved in the database. When user tries to Edit there is no option to deselect everything from the list. How do I let user deselect everything from the list?
Joe
All-Star
52101 Points
23237 Posts
Re: Deselect everything from the ListBox in Edit View
Jan 23, 2019 12:35 PM|mgebhard|LINK
You must set selected item(s) in the ViewBag.Sub. Where is the code that selects items?
https://stackoverflow.com/questions/21826280/selectedvalues-not-working-in-multiselectlist-mvc
Just click the item to remove the selection. Can you provide code that reproduces this issue?
Member
55 Points
448 Posts
Re: Deselect everything from the ListBox in Edit View
Jan 23, 2019 01:33 PM|joegreen2005|LINK
Just found it since it is multi select list box, user can deselect items from list box by clicking Ctrl key.
Contributor
3710 Points
1431 Posts
Re: Deselect everything from the ListBox in Edit View
Jan 24, 2019 08:16 AM|Yuki Tao|LINK
Hi joegreen2005,
I'm glad that you have solved the issue by yourself.
For user-friendliness,I suggest you could add some tips to let users know how to deselect.
And you could also mark the right reply as answer.
This will help other people who faces the same issue.
Thank you very much.
Best Regards.
Yuki Tao
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.