Dim lst As new List(of String)
lst.AddRange({"记账日期","交易类型"})
Dim ct As WinForm.Table = e.Form.Controls("zjjgyszqkTable") 这句代码怎么加载临时表运行后提示找不到zjjgyszqkTable,如果是数据库表就正常呢?
Dim t As Table = ct.Table
Dim str As String
Dim w As Integer = 0
For Each c As Col In t.Cols
If c.Visible Then
If lst.Contains(c.Name) Then
str = str & "|" & c.Name & "|[width]"
Else
If c.Width = -1 Then
str = str & "|" & c.Name & "|98"
w += 98
Else
str = str & "|" & c.Name & "|" & c.Width
w += c.Width
End If
End If
End If
Next
Dim w2 As Integer = (ct.Width-23- w) / lst.Count
str = str.trim("|").Replace("[width]",w2)
t.SetColVisibleWidth(str)