Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
10203 | Jan 26,2004 03:47 PM UTC | Jan 26,2004 04:30 PM UTC | WinForms | 1 |
![]() |
Tags: GridControl |
Dim dt As New DataTable("MyTable")
Dim nCols As Integer = 4
Dim nRows As Integer = 10
Dim i As Integer
Dim j As Integer
For i = 0 To nCols - 1
dt.Columns.Add(New DataColumn(String.Format("Col{0}", i)))
Next
For i = 0 To nRows - 1
Dim dr As DataRow = dt.NewRow()
For j = 0 To nCols - 1
dr(j) = String.Format("row{0} col{1}", i, j)
Next
dt.Rows.Add(dr)
Next
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.