Link to home
Start Free TrialLog in
Avatar of mcskarthikeyan
mcskarthikeyanFlag for United States of America

asked on

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
Avatar of qwerty021600
qwerty021600
Flag of India image

can u share the CSS ?
Avatar of mcskarthikeyan

ASKER

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

vert1 is what I am using.
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>
ASKER CERTIFIED SOLUTION
Avatar of mcskarthikeyan
mcskarthikeyan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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>