Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Datagrid Verticle Header is this possible? How?

 
Thread Tools Search this Thread
Old 03-23-2005, 04:17 PM   #1
Default Datagrid Verticle Header is this possible? How?


I would like to make my column header go verticle instead of horizontal. Is
this an easy task in asp.net. (Actually using Visual Studio.net 2003).

thanks,

Rog




Roger
  Reply With Quote
Old 03-23-2005, 04:27 PM   #2
ashish
 
Posts: n/a
Default Re: Datagrid Verticle Header is this possible? How?
you would have to use DataList with RepeatDirection property set to
RepeatDirection.Vertical



Roger wrote:
> I would like to make my column header go verticle instead of horizontal. Is
> this an easy task in asp.net. (Actually using Visual Studio.net 2003).
>
> thanks,
>
> Rog
>
>



ashish
  Reply With Quote
Old 03-23-2005, 05:04 PM   #3
Guillaume Davion
 
Posts: n/a
Default Re: Datagrid Verticle Header is this possible? How?
Well, this will work, but he won't have any of the fancy features from
the datagrid (sorting and such).

But to put a datagrid upside down.... Guess that can't be done...



Guillaume Davion
  Reply With Quote
Old 03-23-2005, 05:37 PM   #4
Craig Deelsnyder
 
Posts: n/a
Default Re: Datagrid Verticle Header is this possible? How?
Roger wrote:
> I would like to make my column header go verticle instead of horizontal. Is
> this an easy task in asp.net. (Actually using Visual Studio.net 2003).
>
> thanks,
>
> Rog
>
>


You can use <br> tags in your header text and it will render, if I
remember right. Or it should autowrap if the column width was set
smaller than the width of the header text....
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


Craig Deelsnyder
  Reply With Quote
Old 03-23-2005, 06:13 PM   #5
jasonkester
 
Posts: n/a
Default Re: Datagrid Verticle Header is this possible? How?
Roger wrote:
> I would like to make my column header go verticle instead of

horizontal. Is
> this an easy task in asp.net. (Actually using Visual Studio.net

2003).


There is, as you've no doubt discovered, no way to do this with a
simple setting. It sounds doable though. Assuming you want the first
cell of each row to act as a "header", this might work:

- Add a column to your DataTable to hold your rowheaders.
- Run through your DataTable once, populating values for this column.
- In the DataGrid, bind a column to your "header" column, and set its
css class to your header style.
- Turn the Header Visibility off in the DataGrid.

Pretty simple really.

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/



jasonkester
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get datagrid textbox value kanchangorak Software 0 03-11-2009 11:11 AM
Loading 24,000 rows into C# .net Datagrid Kagu Software 0 03-10-2009 06:51 PM
validating textbox inside datagrid susan_1516 Software 0 11-09-2008 01:29 PM
ASP.NET VB Using ItemDataBound to create textbox in datagrid rows. smi59550 General Help Related Topics 0 01-18-2008 07:42 PM
Disable ASP Button in a Datagrid ChrisClayko General Help Related Topics 0 08-02-2006 03:08 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46