Foxtable(狐表)用户栏目专家坐堂 → 关于窗体表引用出错问题


  共有3253人关注过本帖平板打印复制链接

主题:关于窗体表引用出错问题

帅哥哟,离线,有人找我吗?
裴保民
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1989 积分:12631 威望:0 精华:0 注册:2017/4/3 15:01:00
关于窗体表引用出错问题  发帖心情 Post By:2020/4/30 7:45:00 [只看该作者]

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)


 回到顶部
总数 18 1 2 下一页