Asp.net DataGrid with more than 1 datasource

J

Jimmy

Hi

Is it possible to build a datagrid with one column having test1 as a
datasource and another column having test2 as a datasource:
string[] test1 = new string[]{"1", "2", "3"};

string[] test2 = new string[]{"John", "Marc", "Tom"};



I just want a table that looks like this:



1 John

2 Marc

3 Tom



Is this possible with a WebDatagrid or do i have to use another object?



Regards



Jim
 
E

Eliyahu Goldin

Jim,

You need to create a class with properties test1 and test2, make an array of
objects of this class and databind the grid to the array.

Eliyahu
 
J

Jimmy

thanks Eliyahu
Eliyahu Goldin said:
Jim,

You need to create a class with properties test1 and test2, make an array of
objects of this class and databind the grid to the array.

Eliyahu

Jimmy said:
Hi

Is it possible to build a datagrid with one column having test1 as a
datasource and another column having test2 as a datasource:
string[] test1 = new string[]{"1", "2", "3"};

string[] test2 = new string[]{"John", "Marc", "Tom"};



I just want a table that looks like this:



1 John

2 Marc

3 Tom



Is this possible with a WebDatagrid or do i have to use another object?



Regards



Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top