Hi all,

I'm new to asp .net. I would like to get the value from a GridView when a checkbox is checked. I'm creating an HR eAppraisal System.

Need to capture the Employee ID, the CompetencyID and the Evaluation Factor ID

I had a checkboxlist in a GridView. The Checkboxlist Values are fixed and varied from 0 to 5.

Help Please

Hi Chester,

try this :

Sub ActionSave()
        Dim Chk As New CheckBox
        Dim D As GridViewRow
        Dim EmployeeID As String = ""

        For Each D In GVTD.Rows
            Chk = D.FindControl("ChkSelect")
            If Chk.Checked = True Then
                 EmployeeID = D.Cell(1).Text.Trim()
            End If
        Next
    End Sub

Thank

Yeah if u are using C#.net then you can check whether the checkbox is checked or not by the below line of code

CheckBoxList ch=New CheckBoxList()
 ch= ((DropDownList)(gdview.Rows[k].Cells[k].FindControl("Ch1")));
Be a part of the DaniWeb community

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