Solved

Display Gridview's header in row instead of in column

Posted on 2008-10-13
3
336 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net Report Printing Issue 3 35
Store results in vb.net 3 22
Help with adding DLL file in Windows project 20 31
Create a datatable in vb.net dynamically 1 15
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
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…

803 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