Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All, I have added a checkbox column to my datagrid, unfortunately, the checkboxes are not selectable. What am I missing? TIA


VB
Private Sub chkBoxAll_Approve(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkButton.Click
        Dim ctr As New DataGridViewRow

        Try
            For Each ctr In dgvRequests.SelectedRows

                If chkBoxColumn.Selected = True Then
                    Exit For
                ElseIf dgvRequests.CurrentRow.Cells("requestType").Value = "OOORequest" Then
                    Call updateOutOfOffice(LeaveStatus.Approved)
                Else
                    Call updateRequest(LeaveStatus.Approved)
                End If
            Next
        Catch ex As System.Exception
            MessageBox.Show(ex.Message)

        End Try

    End Sub

:sigh:

[Modified: fixed your pre tags]
Posted
Updated 15-Sep-10 7:13am
v2
Comments
Sandeep Mewara 15-Sep-10 14:17pm    
You problem statement and the code does not link up. Can you elaborate what are you trying? Further do insync the codebase accordingly.
Kschuler 11-Nov-10 17:15pm    
I think maybe you are looking for .Checked instead of .Selected

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900