Displaying vertical data

Discussion in 'ASP .Net Datagrid Control' started by Mike Harris, Jan 11, 2005.

  1. Mike Harris

    Mike Harris Guest

    I built a survey that, upon submission creates a record in my MS Sql database. Each record is comprised of 31 fields. I want to use a datagrid to display the data. My challenge is to restructure the data before it is displayed. For example, in my survey I am ranking 31 topics by 1 to 5 using RadioListbutton controls. So the data gets written to the database like so:

    id Topic1 Topic2 Topic3 Topic4 Topic5 Topic6 Topic7........
    1 5 5 3 2 5 2 1 -->Represents the ranking
    2 1 5 5 2 1 4 4
    3 4 4 3 5 2 4 5
    4 5 5 4 1 3 2 2

    When I pull the data out into the datagrid, I want to display it like so:

    Topics 5 4 3 2 1

    Topic1 190 205 216 139 143 -->represents the number of persons voting
    Topic2 207 196 194 115 134
    Topic3 199 185 198 114 146

    I apologize for being verbose but any help is greatly appreciated.
     
    Mike Harris, Jan 11, 2005
    #1
    1. Advertising

  2. Interesting, I did a similar formatting once, But it would be good if you
    could put down your examples properly... I believe curretly its overlapping
    cause of the less width??
    R.Thomas

    "Mike Harris" wrote:

    > I built a survey that, upon submission creates a record in my MS Sql database. Each record is comprised of 31 fields. I want to use a datagrid to display the data. My challenge is to restructure the data before it is displayed. For example, in my survey I am ranking 31 topics by 1 to 5 using RadioListbutton controls. So the data gets written to the database like so:
    >
    > id Topic1 Topic2 Topic3 Topic4 Topic5 Topic6 Topic7........
    > 1 5 5 3 2 5 2 1 -->Represents the ranking
    > 2 1 5 5 2 1 4 4
    > 3 4 4 3 5 2 4 5
    > 4 5 5 4 1 3 2 2
    >
    > When I pull the data out into the datagrid, I want to display it like so:
    >
    > Topics 5 4 3 2 1
    >
    > Topic1 190 205 216 139 143 -->represents the number of persons voting
    > Topic2 207 196 194 115 134
    > Topic3 199 185 198 114 146
    >
    > I apologize for being verbose but any help is greatly appreciated
     
    R. Thomas, aka Xtreme.Net, Jan 12, 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. jylee
    Replies:
    0
    Views:
    517
    jylee
    Oct 15, 2004
  2. Kay
    Replies:
    2
    Views:
    7,236
  3. Ashvin Navare
    Replies:
    0
    Views:
    494
    Ashvin Navare
    Nov 16, 2003
  4. .Net Sports

    datagrid not displaying data table data

    .Net Sports, Aug 30, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,811
    .Net Sports
    Aug 31, 2005
  5. Replies:
    0
    Views:
    169
Loading...

Share This Page