动态表如何设定指定列名自动充满显示呢?
此主题相关图片如下:11.png

当前代码 定时刷新后 显示如上空白数据了
Dim cmd As New S QLCommand
cmd.Connect i
Dim dt,dt1 As DataTable
cmd.CommandText = "sel ect * From 会议议题 where 主题uuid='" & vars("会议主题uuid") &"'"
dt = cmd.ExecuteReader()
Tables("会议主体_table1").DataSource =dt
Tables("会议主体_table1").SetColVisibleWidth("议题标题")
'Tables("会议主体_table1").AutoSizeRows
Dim ts() As String = {"table1"}
For Each s As String In ts
Dim t As Table = e.Form.controls(s).Table
Dim width As Double = t.grid.width - t.grid.cols(0).widthdisplay
Dim sum As Double = 0
For Each c As object In t.grid.cols
If c.index > 0 AndAlso c.visible = True Then
sum += c.widthdisplay
End If
Next
For Each c As object In t.grid.cols
If c.index > 0 AndAlso c.visible = True Then
c.width = c.widthdisplay/sum*width
End If
Next
t.AutoSizeRows
Next
[此贴子已经被作者于2022/11/2 13:16:06编辑过]