Click here to Skip to main content
12,998,483 members (128,664 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 4:38am
Updated 13-Feb-13 5:25am
richcb 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2017
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