ItemStyle-HorizontalAlign="right" not working

T

tshad

I have columns with text and radio buttons that I would like to center or
put to the right of the cell, but the attribute
ItemStyle-HorizontalAlign="right" doesn't seem to work.

<asp:TemplateColumn HeaderText="Job Board" Visible="true"
ItemStyle-Width="150px" HeaderStyle-Width="150px"
ItemStyle-VerticalAlign="middle"
ItemStyle-HorizontalAlign="right">
<itemtemplate>
asp:Label ID="JobBoardName" Text='<%#
Container.DataItem("Name")%>' runat="server"/>
</itemtemplate>
</asp:TemplateColumn>

Why is this and how do I get it to work?

Thanks,

Tom
 
C

Christopher Reed

Try using a separate node for ItemStyle:

<asp:TemplateColumn HeaderText="Job Board" Visible="true">
<HeaderStyle Width="150px" />
<ItemStyle Width="150px" VerticalAlign="middle" HorizontalAlign="right"
/>
<ItemTemplate>
<asp:Label ID="JobBoardName" Text='<%# Container.DataItem("Name")%>'
runat="server" />
</ItemTemplate>
</asp:TemplateColumn>

Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top