简体   繁体   中英

How to show array in DataGridView in VB.NET without using Database?

I want to show Array1 in column1 in Table format. Array2 in Column2. Array3 in Column3. No need Database connection. Just i'll pass 4 arrays in datagridview or any table and it will display the contents of array. array1=column1, array2=column2 and so on....

Just using a For Loop u can do it easily.

 For i As Integer = 0 To array1.GetUpperBound(0) Dim x As String() = {array1(i), array2(i), array3(i), array4(i)} DataGridView1.Rows.Add(x) Next 

Thanx.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM