I havea bool checkbox column and to set the checkboxes to true or false based on the dataset values. It supposed to set to true if the dataset value = 1, false if value = 0.
But the fact is that they are ALWAYS set to true (checked).
Here is my code:
Code:Dim i As Integer With ds.Tables(0) For i = 0 To .Rows.Count - 1 If .Rows(i)("active") = 1 Then .Rows(i)("active") = True ElseIf .Rows(i)("active") = 0 Then .Rows(i)("active") = False End If Next End With




Reply With Quote