自己设置了一个DropDownForm类型的窗口
在DropDownOpened事件中:
Dim r As Row = Tables("年级课程").Current
Dim t As Table = e.Form.Controls("Table1").Table
If r IsNot Nothing Then
t.filter = "年级 = '" & r("年级") & "'"
Else
t.Filter = "false"
End If
Dim y As Row = Tables("年级课程.学生").Current
If y IsNot Nothing AndAlso y.IsNull("选修课") = False Then
Dim a As String() = y("选修课").split(",")
For Each x As Row In t.Rows
x.Checked = a.Contains(x("课程"))
Next
End If
保存的时候提示
编译错误:“Contains”不是“System.Array”的成员。
错误代码:x.Checked = a.Contains(x("课程"))