Dear Telerik Team,
I have the following snippet of code which is located in the postback section of Page_Load. Two checkboxes were checked but it still shows 'false'.
'Attempt reading the SelectedItems Before the Grid Repaints
If (Me.IsPostBack) Then
SPID= String.Empty
For Each gi As GridDataItem In rgp.Items
Dim objValueCheckbox As Object = gi.FindControl("boolValue")
If (Not objValueCheckbox Is Nothing) Then
If (objValueCheckbox.GetType().Name = "CheckBox") Then
Dim chkValueCheckbox As CheckBox = DirectCast(objValueCheckbox, CheckBox)
If Not chkValueCheckbox.Attributes("PID") Is Nothing Then
If (chkValueCheckbox.Checked) Then
SPID= SPID& chkValueCheckbox.Attributes("PID") & ","
End If
End If
End If
End If
Next
SPID= SPID.TrimEnd(",")
End If
I have the following snippet of code which is located in the postback section of Page_Load. Two checkboxes were checked but it still shows 'false'.
'Attempt reading the SelectedItems Before the Grid Repaints
If (Me.IsPostBack) Then
SPID= String.Empty
For Each gi As GridDataItem In rgp.Items
Dim objValueCheckbox As Object = gi.FindControl("boolValue")
If (Not objValueCheckbox Is Nothing) Then
If (objValueCheckbox.GetType().Name = "CheckBox") Then
Dim chkValueCheckbox As CheckBox = DirectCast(objValueCheckbox, CheckBox)
If Not chkValueCheckbox.Attributes("PID") Is Nothing Then
If (chkValueCheckbox.Checked) Then
SPID= SPID& chkValueCheckbox.Attributes("PID") & ","
End If
End If
End If
End If
Next
SPID= SPID.TrimEnd(",")
End If