以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]临时表的DrawCell问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=124922) |
-- 作者:huangfanzi -- 发布时间:2018/9/16 14:56:00 -- [求助]临时表的DrawCell问题 先用以下代码建立临时表并动态增加了列名: Dim dtb As New DataTableBuilder("临时表") dtb.AddDef("描述", Gettype(String), 30) ... 再通过AddNew()增加了一些记录并填入了数据 最后用DataSource的方法将临时表引入到窗口中的一个table表 Dim t1 As Table = Tables("窗口_Table") t1.DataSource = DataTables("临时表") 用此方法后,在窗口中table表的DrawCell事件中代码无效,请问老师应该如何做? 以下是写入的代码: If e.Table.Rows.Count > 0 Then e.Table.DataTable.AddUserStyle("样式3", Color.Transparent,Color.RED) If e.Row("开盘时间") <> Nothing AndAlso e.Row("开盘时间") < Date.Now Then e.style = "样式3" End If End If |
-- 作者:有点甜 -- 发布时间:2018/9/16 16:19:00 --
Dim t1 As Table = Tables("窗口_Table")
然后
在全局表事件写代码 http://www.foxtable.com/webhelp/scr/0671.htm
|