Binding Two dimensional arrays to Datagrid
-
Hey: I have my data in two dimensional arrays. I want to display those data in Datagrid. Can anybody guide me how can I do this? hsprasain
-
-
The article supplied contains a library that will create a proper datasource from a multi-dimensional array. Just download the .dll and add a reference to it. You can then use it like this:
Dim test(2, 2) As String test(0, 1) = "SomeData" test(0, 2) = "SomeOtherData" DataGridView1.DataSource = New Mommo.Data.ArrayDataView(test)
-
I have given the Idea with the help of that article. I cannot do your work. Please do the work and if there is any problem we can guide you.
Regards, Satips.:rose:
-
The code is easily convetible to VB.NET. If you want a translation guide, all you have to do is look in the documentation on MSDN. Nearly every single code sample for any class, method, or property, comes written in VB.NET and C#. All you have to do is compare the two to learn the syntax.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
The article supplied contains a library that will create a proper datasource from a multi-dimensional array. Just download the .dll and add a reference to it. You can then use it like this:
Dim test(2, 2) As String test(0, 1) = "SomeData" test(0, 2) = "SomeOtherData" DataGridView1.DataSource = New Mommo.Data.ArrayDataView(test)