Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET
Details are coming in this way from Database
UserName ConfigItem ProjectTraining Documentation Troubleshooting CodeChange Total
Bhanu Goankar AFOTA 7 18 25
Bubai Banerjee AFOTA 7 16 23
Total AFOTA 14 34 48
Bhanu Goankar GENERAL 38 2 40
Bubai Banerjee GENERAL 36 3 39
Total GENERAL 74 5 79

But I want it in this in this below way

UserName Documentation CodeChange ProjectTraining Troubleshooting Total
Bhanu Goankar 7 18 38 2 65
Bubai Banerjee 7 16 36 3 62
Total 14 34 74 5 127

I am using 4.0 and Sqlserver 2008. I want to fetch record from Database to gridview.I am very new in this system(Freshers). So please help me. Thanks in Advance
Posted 13-Feb-13 5:38am
Edited 13-Feb-13 6:25am
richcb at 13-Feb-13 10:40am
You will need to post the code you are using the achieve these results. Also, this is a repost. Doing that will only prolong your potential answer.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


check the below article.
Display Columns as Rows in GridView in ASP.NET[^]

in the article, author used, sample data for datatable, but you can modify as the result from your stored procedure or database query. Author also used "FlipFlopTable" function, there you have to modify according to the your display structure.

hope it helps.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Suvendu Shekhar Giri 245
1 Sergey Alexandrovich Kryukov 215
2 Andy Lanng 185
3 Abhinav S 184
4 PIEBALDconsult 180
0 Sergey Alexandrovich Kryukov 6,360
1 OriginalGriff 5,878
2 Peter Leow 2,514
3 Maciej Los 2,263
4 Abhinav S 2,249

Advertise | Privacy | Mobile
Web03 | 2.8.150414.1 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100