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
LVL 2
mcskarthikeyanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.