老师,CheckedListBox1控件怎样和Table1控件同步。
这是按钮代码
Dim chl As WinForm.CheckedListBox = e.Form.Controls("CheckedListBox1")
Dim item As String = chl.SelectedValue
Dim idx As Integer = chl.SelectedIndex
chl.Items.RemoveAt(chl.SelectedIndex)
chl.Items.Insert(idx-1,item) '向上移动
chl.SelectedValue = item
e.Form.Controls("往下移动").TopMost=True
e.Form.Controls("往下移动").Visible=True
下面是加载表代码
Tables("一号楼水电气使用数据查询_Table1").Fill("Select * Fr om {一号楼查询}","房屋出租能源消耗数据查询",True)
e.Form.Controls("CheckedListBox1").Items.Clear
For Each c As Col In e.Form.Controls("Table1").Table.Cols
If c.Visible = True Then e.Form.Controls("CheckedListBox1").Items.Add(c.name)
Next
Dim c1 As String
按钮是调整CheckedListBox里的项目的顺序?那又和table有什么关系?