我有一个数据绑定的复选框:
With Me.chkChaineSelected
.DataSource = dtChainesTvRadio
.DisplayMember = "Chaînes TV/RADIO"
End With
为了检查项目,我使用了一个循环:
Dim strSelectedLinkeChaine Aa String
For i As Integer = 0 To (chkChaineSelected.Items.Count - 1)
If chkChaineSelected.GetItemChecked(i) Then
strSelectedLinkeChaine = DirectCast(Me.chkChaineSelected.Items(i)("Chaînes TV/RADIO"), String)
End If
Next
但这不适用于Option Strict On
,问题是后期绑定(BC30574)位于Me.chkChaineSelected.Items(i)