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.
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.