This is a migrated thread and some comments may be shown as answers.

Listbox with either 1 or 0 selections

2 Answers 32 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jerry
Top achievements
Rank 1
jerry asked on 17 Mar 2010, 02:06 PM
How can I setup my listbox control to allow only 1 selection or 0 selections?  Say I have a list and the user can select a city and save it but then he is able to come back and see what is highlighted then decides he doesn't want any of the cities selected so he clicks on the 1 city he picked before and it needs to deselect that row and have no rows within the list selected.  Is this possible with just using the llistbox?

Thank You

2 Answers, 1 is accepted

Sort by
0
Accepted
Victor
Telerik team
answered on 19 Mar 2010, 10:25 AM
Hello jerry,

RadListBox does not provide such behavior out of the box. You will have to manipulate the SelectedItems collection manually according to your requirements.

Kind regards,
Victor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
jerry
Top achievements
Rank 1
answered on 19 Mar 2010, 01:39 PM
Victor,
Thank you for your response.  Do you have any example code?

Thank You
Jerry
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
jerry
Top achievements
Rank 1
Answers by
Victor
Telerik team
jerry
Top achievements
Rank 1
Share this question
or