ASP.net datagrid with more than 1 datasource

Discussion in 'ASP .Net Datagrid Control' started by Jimmy, Jun 14, 2005.

  1. Jimmy

    Jimmy Guest

    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
    Jimmy, Jun 14, 2005
    #1
    1. Advertising

  2. 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
    >
    >
    Eliyahu Goldin, Jun 14, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jimmy
    Replies:
    2
    Views:
    369
    Jimmy
    Jun 14, 2005
  2. Jimmy

    ASP.net datagrid with more than 1 datasource

    Jimmy, Jun 14, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    174
    Patrice
    Jun 14, 2005
  3. Bob Rashkin
    Replies:
    5
    Views:
    72
    Dennis Lee Bieber
    Dec 23, 2013
  4. Steven D'Aprano
    Replies:
    0
    Views:
    90
    Steven D'Aprano
    Dec 23, 2013
  5. Replies:
    3
    Views:
    82
    Gary Herron
    Dec 23, 2013
Loading...

Share This Page