Howto display an ASP.net datagrid rows as columns and vice versa?

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

  1. Jimmy

    Jimmy Guest

    Hi

    I want to display my datagrid with the columns horizontal and rows vertical,
    so just the other way around. For example instead of :

    name address city
    Tom 200 George Street Sydney

    i would like:

    name Tom
    address 200 George Street
    city sydney

    ch

    Jim
     
    Jimmy, Jun 14, 2005
    #1
    1. Advertising

  2. Jimmy

    Elton Wang Guest

    Hi Jimmy,

    When Rendering to client-side, a datagrid actually is an html table. If your
    data is for view only, you can create your own html table based on your
    data. It's not big deal to show data horizontally in html table.



    HTH



    Elton Wang







    "Jimmy" <> wrote in message
    news:...
    > Hi
    >
    > I want to display my datagrid with the columns horizontal and rows

    vertical,
    > so just the other way around. For example instead of :
    >
    > name address city
    > Tom 200 George Street Sydney
    >
    > i would like:
    >
    > name Tom
    > address 200 George Street
    > city sydney
    >
    > ch
    >
    > Jim
    >
    >
     
    Elton Wang, Jun 14, 2005
    #2
    1. Advertising

  3. Jimmy

    Kim Quigley Guest

    Instead of having 3 columns (name, address, city), create a template column.
    In that column, create a table of two columns and 3 rows with the headings
    in the first column and label controls in the second column. Set the text
    property of the label controls to

    text='<%# Container.DataItem("fieldname")%>'


    "Jimmy" <> wrote in message
    news:...
    > Hi
    >
    > I want to display my datagrid with the columns horizontal and rows
    > vertical,
    > so just the other way around. For example instead of :
    >
    > name address city
    > Tom 200 George Street Sydney
    >
    > i would like:
    >
    > name Tom
    > address 200 George Street
    > city sydney
    >
    > ch
    >
    > Jim
    >
    >
     
    Kim Quigley, Jun 16, 2005
    #3
    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. helpful sql
    Replies:
    0
    Views:
    833
    helpful sql
    May 19, 2005
  2. Jimmy
    Replies:
    1
    Views:
    3,172
    Eliyahu Goldin
    Jun 14, 2005
  3. carmen
    Replies:
    4
    Views:
    30,755
    ersecchio
    Jan 12, 2010
  4. Anjan Bhowmik
    Replies:
    1
    Views:
    338
    Patrice
    Mar 6, 2008
  5. Peter Otten
    Replies:
    1
    Views:
    163
    Andreas Perstinger
    Jun 18, 2013
Loading...

Share This Page