老师,控件绑定表列,控件对应的内容,控件绑定,文本、数值、逻辑;但是控件本身不一定是文本、数值、逻辑,例如
{"FileManager","PictureViewer","BarCode"}这三种控件
下列代码,当循环表中控件,将值写入表中,标注颜色的部分,就会报错,上述三种控件貌似不是TEXT,应该怎么写?
For Each nb As object In pnl.Children
If nb.Bindingfield > "" Then
tb=nb.BindingField.Split(".")(0)
cl=nb.BindingField.Split(".")(1)
If Tables(tb).Current IsNot Nothing Then
Dim c As Col = Tables(tb).Cols(cl)
If c.IsBoolean Then
Tables(tb).Current(cl)=nb.checked
ElseIf c.IsNumeric Then
Tables(tb).Current(cl)=nb.value
Else
Tables(tb).Current(cl)=nb.text
End If
Tables(tb).FinishEditing
End If
End If
Next