The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Is there a way to populate the gridlistcontrol without using a datasource? I am trying to display a couple columns in the gridlistcontrol. I have 1 rows x N columns. The number of columns are dynamic. Is this feasible?
thanks.
ADAdministrator Syncfusion Team January 26, 2004 11:30 AM
The gridListControl1 does not ''store'' any data. So, you do have to have some datasource. There are several things you could try to do.
You can just manually populate a datatable and use that as the datasource. That would be the simplest thing to do. Here is some sample code:
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