Displaying vertical data

M

Mike Harris

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

R. Thomas, aka Xtreme.Net

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
 

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

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top