Listbox with either 1 or 0 selections

3 posts, 1 answers
  1. jerry
    jerry avatar
    103 posts
    Member since:
    Feb 2008

    Posted 17 Mar 2010 Link to this post

    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. Answer
    Victor
    Admin
    Victor avatar
    1351 posts

    Posted 19 Mar 2010 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. jerry
    jerry avatar
    103 posts
    Member since:
    Feb 2008

    Posted 19 Mar 2010 Link to this post

    Victor,
    Thank you for your response.  Do you have any example code?

    Thank You
    Jerry
Back to Top