ei guys, i am stuck in getting unchecked in listview... pls help me... thank u :) this is my code...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        For Each item As ListViewItem In ListView1.Items
            If CheckState.Unchecked Then
           End If

    End Sub

Recommended Answers

All 4 Replies


You should try something like this:

Dim item As ListItem
	For Each item In ListView1.ListItems
		If item.Selected = False Then
			'do your stuff here
		End If

CheckState.Unchecked is not about the individual items.

For Each item As ListViewItem In ListView1.Items
            If item.Checked = False Then '// check if Not Checked.
                MsgBox(item.SubItems(1).Text) '// get value of "item" .SubItems(1).
            End If
commented: thank u :) +1

Thank you to all..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.