Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

GridView bind a 2d array

Posted on 2008-06-16
2
Medium Priority
?
1,088 Views
Last Modified: 2013-11-26
Hi,

I have a 2 dimensional array ...

Dim arr(50, 3) as string

I have put the data into this array, but now i want to put the data from the array into a gridview.  Has anyone got the code to do this?

Thanks,

Darryl
0
Comment
Question by:yo_daz_uk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
zveljkovic earned 400 total points
ID: 21792358
Hi. here is some sample code for you.
			DataTable t = new DataTable("name");
//add coresponding number of columns or just go in for loop
			t.Columns.Add("col1");
			t.Columns.Add("col2");
			t.Columns.Add("col3");
			t.Columns.Add("col4");
//add new row 
			t.Rows.Add( new String[] {"asdf","qwer","ertt","rtyerty"});
			t.Rows.Add( new String[]  {"asdf","qwer","ertt","rtyerty"});
//databind
			this.dataGridView1.DataSource = t;

Open in new window

0
 

Author Closing Comment

by:yo_daz_uk
ID: 31467540
i used similar code to the above to achieve this
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question