且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将所有项目/数据/值从列表框导出/传输到datagridview

更新时间:2023-02-10 15:30:15



in vb.net solution
Dim Counter As Integer = 0

     For I As Integer = 0 To 6
         Dim RowItems(7) As String
         For J As Integer = 0 To 7
             RowItems(J) = ListBox1.Items(Counter)
             Counter += 1
         Next
         DataGridView1.Rows.Add(RowItems)
     Next