Checkbox List
I have a checkbox list that is created based on a stored procdeure.
This works fine. I want to check off the boxes based on the values returned by another stored procedure.
Here is the code that I have tried using:
Dim check As DataRow = DS_SectionEnrollmentTypes1.Tables("sp_Get_Section_ Enrollment_Types").Rows(0)
For i = 0 To CB_EnrollmentTypes.Items.Count - 1
CB_EnrollmentTypes.Items(i).Selected = False
If CB_EnrollmentTypes.Items(i).Text = check("codes") Then
CB_EnrollmentTypes.Items(i).Selected = True
End If
Next
But all it ever does is check off the first box.
HELP!
|