Dim dt As DataTable = DataTables("表设置") Dim bm As Table = e.Form.Controls("Table1").Table For Each c As Col In bm.Cols c.visible = False Next For Each dr As DataRow In dt.Select("zt = '" & bm.current("zt") & "' And 显示 = true") Dim c As Col = bm.Cols(dr("列名")) c.Visible = True c.Caption = dr("标题") c.Width = dr("列宽") Next bm.DataTable.BuildHeader