以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]动态更改列名称,和时间列属性  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=160065)

--  作者:fczhaobo
--  发布时间:2021/1/19 11:55:00
--  [求助]动态更改列名称,和时间列属性
动态更改列名称,不成功呢?怎么办合适?
        Dim cmd As New SQLCommand
        cmd.C
        Dim dt As DataTable
        cmd.CommandText = "SEL-ECT * From {学员课时记录表} where 缴费编号=\'" & r("缴费编号") & "\'"
        dt = cmd.ExecuteReader()
        With dt
            .DataCols("点名时间").Caption = "考勤时间"
             .DataCols("点名时间").         \'此列默认显示YYYY-MM-DD格式,我想带上时\\分和秒
            .DataCols("任课教师编号").Caption = "上课老师"
            .BuildHeader()
        End With
        Tables(e.form.name & "_Table1").DataSource =dt

--  作者:有点蓝
--  发布时间:2021/1/19 12:09:00
--  
       Dim cmd As New SQLCommand
        cmd.C
        Dim dt As DataTable
        cmd.CommandText = "SEL-ECT * From {学员课时记录表} where 缴费编号=\'" & r("缴费编号") & "\'"
        dt = cmd.ExecuteReader()
        Tables(e.form.name & "_Table1").DataSource =dt
        With dataTables(e.form.name & "_Table1")
            .DataCols("点名时间").Caption = "考勤时间"
             .DataCols("点名时间").SetDateTimeFormat(DateTimeFormatEnum.DateLongTime)    http://www.foxtable.com/webhelp/topics/1611.htm     \'此列默认显示YYYY-MM-DD格式,我想带上时\\分和秒
            .DataCols("任课教师编号").Caption = "上课老师"
            .BuildHeader()
        End With