?
Solved

Set DataGrid header text to show vertically

Posted on 2006-11-17
4
Medium Priority
?
867 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

800 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