• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3236
  • Last Modified:

GridView Header Text Direction in Vertical

Hi,

I have a GridView with 6 Columns. I want the last 3 column header text to be displayed in vertical direction. I tried some CSS [writing-mode: tb-rl]. But it is changing all the header text direction. But I need the change only for the last 3 column header.

Thanks
0
mcskarthikeyan
Asked:
mcskarthikeyan
  • 3
  • 2
1 Solution
 
qwerty021600Commented:
can u share the CSS ?
0
 
mcskarthikeyanAuthor Commented:
<style type="text/css">
.vert1 th { writing-mode: bt-rl; }
.vert2 th { writing-mode: tb-rl; }
</style>

vert1 is what I am using.
0
 
qwerty021600Commented:
where r u putting this css
i feel the format is wrong

rather it shud be

<style type="text/css">
th.vert1 { writing-mode: bt-rl; }
th.vert2 { writing-mode: tb-rl; }
</style>
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
mcskarthikeyanAuthor Commented:
qwerty, I am applying the CSS in GridView CssClass property like below.

<asp:GridView ID="GridView1" runat="server" AllowSorting="True" BackColor="White"  CssClass="vert1" >

this working, but for all the column headers. I need to apply this CSS only for last 3 column headers. any idea?
0
 
qwerty021600Commented:
refer to this url.. may be browser problem.. u can cross check from here
http://msdn.microsoft.com/en-us/library/ms531187(VS.85).aspx
0
 
DmitryVasilievCommented:
mcskarthikeyan, You can use custom style for any GridView column
Something like this:
<style type="text/css">
.vert1 { writing-mode: bt-rl; }
</style>
...
<asp:GridView ID="GridView1" runat="server" >
<Columns>
             <asp:BoundField DataField="MyDataField" HeaderText="<header>"
                 HeaderStyle-CssClass="vert1" />
...
</Columns>
</asp:GridView>
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now