【发布时间】:2018-09-26 03:22:56
【问题描述】:
我这里有代码,但它只填充清单框中的项目。
Dim lst As New List(Of String) From {dtr.GetInt32("fps_pump_id")}
Do
For Each items As String In lst
y = dtr.GetInt32("fps_pump_id")
PumpStation.CheckedListBox1.Items.Add(y & " [" & items & "]")
PumpStation.CheckedListBox1.Items(y).Enabled = False 'this line won't work
Next
x += 1
Loop Until x = ps_table.Rows.Count
dtr.getIn32("fps_pump_id") 是一个预加载的MySqlDataReader,用于从本地数据库中获取数据。
【问题讨论】:
-
我不知道你对 C# 的理解程度如何,但我发现这个答案很有帮助:stackoverflow.com/a/31370469
标签: vb.net winforms checkedlistbox