Solved

Set DataGrid header text to show vertically

Posted on 2006-11-17
4
857 Views
Last Modified: 2008-02-01
I have an ASP.NET 1.1 application that will have a large-ish number of users completing a series of educational modules.  At the end of each module the user completes a multiple choice test.
I'm trying to figure out what the best way is to display which users completed which module tests.  I thought that a DataGrid would work relatively well by having a list of users down the left side of the DG, and the names of the modules across the top.  If User "Smith" completed module test "VAP", then the DataGrid cell at that "coordinate" would be filled with a solid colour.  Any module tests not completed would remain empty.

My question (after all of that), is how can orient the names of the modules across the top of the DG (i.e. the headers) vertically (or at an angle), in order to use space as effeciently as possible?

Thanks
0
Comment
Question by:tmccrank
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:ibost
ID: 17967905
I would create a "false" header row... i.e. a table above the datagrid with columns set to the same width as the datagrid's columns.  Then in the datagrid set ShowHeader=false

I could be wrong but I don't think a datagrid will support rotating the text 90 degrees.
0
 
LVL 10

Accepted Solution

by:
ibost earned 250 total points
ID: 17968043
Ahh i found a possible solution:

Before you call DataBind()

Add a line like this for each column you want vertical:
MyDataGrid.Columns[1].HeaderText = "<DIV STYLE=\"writing-mode:tb-rl\">My Header</DIV>";
0
 

Author Comment

by:tmccrank
ID: 17969442
Interesting, thanks ibost.  I won't be able to try it out for a little while, but I'll get back to you asap.
0
 

Author Comment

by:tmccrank
ID: 18115620
Sorry for leaving this so long ibost, I was distracted by a couple of things that took me away from this project.  Unfortunately, this is still the case so I haven't had a chance to test your code.  Nevertheless, I appreciate your input, I hope to give it a shot fairly soon.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

757 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

18 Experts available now in Live!

Get 1:1 Help Now