【问题标题】:convert datatable to listview vb.net将数据表转换为列表视图 vb.net
【发布时间】: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)

我如何创建带有列表视图的数据表,包含列、星期一、星期二等...

【问题讨论】:

    标签: java asp.net vb.net


    【解决方案1】:

    下面的链接可能对你有帮助

    Fill a ListView with any Dataset

    【讨论】:

    • 我如何将其转换为 aspx 页面中的列表视图
    猜你喜欢
    • 1970-01-01
    • 2018-05-11
    • 2021-10-25
    • 1970-01-01
    • 1970-01-01
    • 2012-04-07
    • 1970-01-01
    相关资源
    最近更新 更多