Results 1 to 3 of 3

Thread: Check All Checkboxes in Checked List View

  1. #1

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    Check All Checkboxes in Checked List View

    Hello,

    I have a checked list view on my form.

    Is there a way to check all boxes on the press of a button ?

    Thanks,

  2. #2
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: Check All Checkboxes in Checked List View

    vb.net Code:
    1. Public Class Form2
    2.  
    3.     Private Sub Button1_Click( _
    4.         ByVal sender As System.Object, _
    5.         ByVal e As System.EventArgs _
    6.     ) Handles Button1.Click
    7.  
    8.         For Each listItem As ListViewItem In ListView1.Items
    9.             listItem.Checked = True
    10.         Next
    11.     End Sub
    12.  
    13. End Class

  3. #3

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    Re: Check All Checkboxes in Checked List View

    Thanks Deepak, I'll give that a go as it looks like it will do the trick.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width