0

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
                MsgBox(ListView1.Items.Item(0).SubItems(1).Text)
           End If
        Next

    End Sub

Edited by bLuEmEzzy: n/a

4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by bLuEmEzzy
0

Hi,

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
	Next
1
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
        Next
Votes + Comments
thank u :)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.