Solved

Display Gridview's header in row instead of in column

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

749 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