发现一个新问题:设置列编辑格式按钮的代码如下:
Dim t As Table = e.Form.Controls("Table1").Table
If t.Current Is Nothing Then Return
If t.Current.IsNull("glCol") = False Then
If CurTbl.cols.Contains(t.Current("glCol")) Then
If CurTbl.cols(t.Current("glCol")).DataMap IsNot Nothing Then
t.Cols("glValue").DataMap = CurTbl.cols(t.Current("glCol")).DataMap ‘如果更换了列的datamap,
其他行原来选好值的数据不见了,后台虽然有,但是不显示
ElseIf CurTbl.cols(t.Current("glCol")).IsDate Then
t.grid.cols("glValue").Editor = new windows.forms.DateTimePicker
Else
t.grid.cols("glValue").Editor = new windows.forms.TextBox
End If
End If
Else
t.Cols("glValue").DataMap = Nothing
t.Current("glValue") = Nothing
t.grid.cols("glValue").Editor = new windows.forms.TextBox
End If