以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  DrawCell无法自动执行  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=59163)

--  作者:luodang2050
--  发布时间:2014/10/30 10:37:00
--  DrawCell无法自动执行

如题,DrawCell事件设置了样式,但是每次都必须手动确定一下自定义样式,才能执行,不知为啥


--  作者:有点甜
--  发布时间:2014/10/30 10:39:00
--  
 例子发上来。
--  作者:luodang2050
--  发布时间:2014/10/30 11:51:00
--  
If e.Col.Name = "工程名称" Then \'如果正在绘制的是密码列
    If e.Row("归档")=True
        \'e.Text = "【归档】" & e.Row("工程名称")
        e.Style="归档"
    End If
End If
If e.Col.Name = "投标情况" Then
    If e.Row("投标情况") = "参投" Then
        e.Style = "参投"
    End If
    If e.Row("投标情况") = "待定" Then
        e.Style = "待定"
    End If
End If
If e.Col.Name = "实际定标时间" Then
    If e.Row("实际定标时间") < Date.Today And e.Row("实际定标时间") > #0:00:00# Then
        e.Style = "完成"
    End If
End If
If e.Col.Name = "发布网站" Then
    Select Case e.Row("发布网站")
        Case "深圳建设交易"
            e.style =  e.Row("发布网站")
        Case "龙岗建设交易"
            e.style =  e.Row("发布网站")
        Case "宝安建设交易"
            e.style =  e.Row("发布网站")
        Case "宝安街道办"
            e.style =  e.Row("发布网站")
    End Select
End If

--  作者:Bin
--  发布时间:2014/10/30 11:52:00
--  
在ALterOpenPprject事件,用代码设置样式