Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This code is not allowing me to select more than one item from my listbox

What I have tried:

C#
public void SelectAdditionalStaffEmailUpdate(ListboxItem item)
        {
            int selectIndex = 0;
            selectIndex = AdditionalStaffEmailUpdateListBox.FindString(item.Text);
            AdditionalStaffEmailUpdateListBox.SelectedIndex = selectIndex;
        }
Posted
Updated 1-Jul-19 5:58am

1 solution

Change the SelectionMode property[^] - it defaults to "One".
 
Share this answer
 
Comments
Member 11403304 1-Jul-19 16:08pm    
I did not understand what you meant by change the SelectionMode property - it defaults to "One". Please give me more details as to how to make the change you mentioned.
Maciej Los 1-Jul-19 16:14pm    
Follow the link (it's MSDN documentation).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900