【发布时间】:2013-07-16 09:38:34
【问题描述】:
我制作了一个数据表,但想将其更改为列表视图。
使用 vb.net
我的代码:
Dim table As New DataTable
' columns in the DataTable.
table.Columns.Add("Monday", System.Type.GetType("System.Int32"))
table.Columns.Add("Tuesday", System.Type.GetType("System.Int32"))
table.Columns.Add("Wednesday", System.Type.GetType("System.Int32"))
table.Columns.Add("Thursday", System.Type.GetType("System.Int32"))
table.Columns.Add("Friday", System.Type.GetType("System.Int32"))
' rows with those columns filled in the DataTable.
table.Rows.Add(1, 2005, 2000, 4000, 34)
table.Rows.Add(2, 3024, 2343, 2342, 12)
table.Rows.Add(3, 2320, 9890, 1278, 2)
table.Rows.Add(4, 3420, 1234, 4321, 89)
table.Rows.Add(5, 3240, 6600, 1100, 56)
table.Rows.Add(6, 4320, 1100, 3243, 23)
table.Rows.Add(7, 4540, 7645, 4324, 56)
table.Rows.Add(8, 4540, 4321, 8905, 43)
table.Rows.Add(9, 3420, 7654, 6780, 23)
table.Rows.Add(10, 4530, 6734, 9856, 21)
table.Rows.Add(11, 3240, 1278, 4327, 12)
我如何创建带有列表视图的数据表,包含列、星期一、星期二等...
【问题讨论】: