Click here to Skip to main content
15,306,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I have a listview control with list of items bind onto it, each list items has checkbox in front of them, now i want to update any list item which the checkbox associated with it is checked.

Thanks in advance!
Posted
Comments
PSK_ 18-Jun-10 4:24am
   
What you have done till now? What are the issues you are facing?

1 solution

You mean something like this?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        
        Dim v As Integer
line1:
        For v = 0 To ListView1.Items.Count - 1
            If ListView1.Items(v).Checked = False Then
                ListView1.Items.RemoveAt(v)
                GoTo line1
            End If
        Next v
        
        ListView1.Update()

    End Sub
   
v2
Comments
Henry Minute 18-Jun-10 7:31am
   
I really hope that the OP wasn't looking for something like that! "GoTo" eeeeeeuuuugggghhh!!! :-)
Scubapro 18-Jun-10 8:32am
   
Auriculas asini quis non habet

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