Advertisement
Advertisement
| 03.26.2008 at 05:03PM PDT, ID: 23272582 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: |
Code:
Protected Sub CustomValidator_Checkboxlist_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs)
Dim i As Integer
Dim selected As String
Dim gvRow As GridViewRow
Dim iCounter As Integer
For Each gvRow In GridView_Consol_HBL.Rows
If iCounter = -1 Then
iCounter = 0
End If
Dim cbxList As CheckBoxList = GridView_Consol_HBL.Rows(iCounter).FindControl("CheckBoxList_Consol_Docs")
For i = 0 To cbxList.Items.Count - 1
If cbxList.Items(i).Selected Then
selected = "yes"
End If
Next
iCounter += 1
Next
If selected = "yes" Then
args.IsValid = True
Else
args.IsValid = False
End If
selected = ""
End Sub
|