Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > ASP.net datagrid with more than 1 datasource

Reply
Thread Tools

ASP.net datagrid with more than 1 datasource

 
 
Jimmy
Guest
Posts: n/a
 
      06-14-2005
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


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      06-14-2005
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" <> wrote in message
news:%...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com Java 0 03-06-2008 08:11 AM
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com C++ 0 03-05-2008 08:41 AM
Like all great travelers, I have seen more than I remember andremember more than I have seen. shenrilaa@gmail.com C Programming 0 03-05-2008 03:26 AM
ASP.net datagrid with more than 1 datasource Jimmy ASP .Net Web Controls 3 06-14-2005 03:38 PM
Asp.net DataGrid with more than 1 datasource Jimmy ASP .Net 2 06-14-2005 12:36 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57