I have the following event handler:
I want this to enable buttons only when there's at least one ListViewItem that's checked.
What actually happens, is if none are checked, then I check one, the event fires and it says that [tt]lvwRequests_auth.CheckedItems.Count = 0[/tt].
How can I get this to do what I want it to?
Thanks,
Dot
Code:
Private Sub lvwRequests_auth_ItemCheck(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemCheckEventArgs) Handles lvwRequests_auth.ItemCheck
If lvwRequests_auth.CheckedItems.Count = 0 Then
btnApprove_auth.Enabled = False
btnView_auth.Enabled = False
btnDeny_auth.Enabled = False
Else
btnApprove_auth.Enabled = True
btnView_auth.Enabled = True
btnDeny_auth.Enabled = True
End If
End Sub
What actually happens, is if none are checked, then I check one, the event fires and it says that [tt]lvwRequests_auth.CheckedItems.Count = 0[/tt].
How can I get this to do what I want it to?
Thanks,
Dot