How to use a checkbox in a datagrid template column
in my code the chkpcc.checked=true is showing false, though it is checked.
Private Sub btngen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btngen.Click
Dim dgi As DataGridItem
Dim StrpccID As String
For Each dgi In dgCTrack.Items
Dim chkPCC As CheckBox
chkPCC = CType(dgi.FindControl("cbtPCC"), CheckBox)
If chkPCC.Checked = True Then
StrpccID += CType(dgi.Cells(1).FindControl("lblpccid"), Label).Text & ","
End If
Next
StrpccID = StrpccID.TrimEnd(",")
Session("PCCList") = StrpccID
Response.Redirect("newsaragencydetail.aspx")
End Sub
Re: Checkbox.checked [SOLVED]
This problem was solved
on page load event ...
If Not IsPostBack Then
datagrid.bind()
end if