M
Mr. SweatyFinger
Dim adapter As New System.Data.OleDb.OleDbDataAdapter(cmd, conn)
Dim ds As New System.Data.DataSet
adapter.Fill(ds)
Dim row As System.Data.DataRow
Dim i As Integer
Dim catName As String
For Each row In ds.Tables(0).Rows
catName = row.Item(0)
Response.Write(catName & "<br>")
Dim cbl As CheckBoxList = formview1.FindControl("CheckBoxList1")
If Not cbl.items.FindByValue(row.Item(0).tostring) Is Nothing Then
cbl.items.FindByValue(row.Item(0).tostring).selected = True
<===================Not working
End If
'cbl.items()
'listitem.
i += 1
Next
Dim ds As New System.Data.DataSet
adapter.Fill(ds)
Dim row As System.Data.DataRow
Dim i As Integer
Dim catName As String
For Each row In ds.Tables(0).Rows
catName = row.Item(0)
Response.Write(catName & "<br>")
Dim cbl As CheckBoxList = formview1.FindControl("CheckBoxList1")
If Not cbl.items.FindByValue(row.Item(0).tostring) Is Nothing Then
cbl.items.FindByValue(row.Item(0).tostring).selected = True
<===================Not working
End If
'cbl.items()
'listitem.
i += 1
Next