DrawCell事件放到全局表事件的DrawCell:
http://www.foxtable.com/webhelp/topics/0671.htm
AfterLoad事件中,代码如下:If tb0.Cols(tb0.ColSel).name = "检测_内容" Then
Tables("窗口2_table1").DataSource = DataTables(jgb)
Tables("窗口2_table1").Filter = cexp("[专业]='{0}' and [次分类]='{1}'and [选择规则]='{2}' ",tb0.current("专业"),tb0.current("检测_类别"),"参数")
Dim cvs As String="次分类|93|收费项目|151|单项价格|54|项目单位|80|检验条件|180|备注|120"
Tables("窗口2_table1").SetColVisibleWidth(cvs)
End If
Tables("窗口2_table1").DataTable.AddUserStyle("style_选中", Color.CornflowerBlue, Color.white)
Tables("窗口2_table1").DataTable.GlobalHandler.DrawCell = True