Solved

Display Gridview's header in row instead of in column

Posted on 2008-10-13
3
338 Views
Last Modified: 2012-05-05
Hi,
Currently Gridview can display information in below format:
------------------------------------
header1 header2 header3
------------------------------------
row1      row2     row3
row4      row5     row6

Can i display the headers in the row like below?
-----------------------------------
header1  | col1  | col4
header2  | col 2 | col5
header3  | col3  | col6

If yes, how to do it?
0
Comment
Question by:tangteng78
  • 2
3 Comments
 
LVL 22

Expert Comment

by:prairiedog
ID: 22706083
It seems that you need a pivot table. This example tells you how to create a pivot data table and bind it to a DataGrid. You should be able to use it for GridView as well.
http://aspalliance.com/538_CodeSnip_Pivot_Tables_with_ADONET_and_Display_in_a_DataGrid_Paged_Horizontally.all
0
 

Author Comment

by:tangteng78
ID: 22708800
It doesn't explain how it can be done using SqlDataSource web control? I'm using the sqldatasource to bind with GridView, thus user is able to edit, delete straight away in the GridView.
Any advice?
0
 

Accepted Solution

by:
tangteng78 earned 0 total points
ID: 22867009
Finally found out the solution. By using DetailView, able to get the table format i want.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question