Solved

Set DataGrid header text to show vertically

Posted on 2006-11-17
4
862 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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…
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…

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