Solved

Display Gridview's header in row instead of in column

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now