Click here to Skip to main content
16,004,587 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear

i have one ListView with checkbox.outside one Button.
I want to find the items of ListView Control checked items after a button click.
Posted

1 solution

Ok I actually couldn't get what exactly you want to achieve here. Leme guess, if am right you have a ListView control with some Items and you also have a button on the form. When you click the button, you want all the checked items in the ListView to be displayed?
If i'm right the here's a rough piece of code...
try and leme know if it worked for you....

C#
foreach (ListViewItem item in listView1.Items)
            {
                if (item.Checked)
                    MessageBox.Show(item.ToString() + " is checked");
            }


Regards,
 
Share this answer
 

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