Hi,
I am using 9.2.20092.2056.
I try to RIght align the text by:
<style type="text/css"> .RAlign { text-align:right; font-weight:bold;} </style>....
<ig:BoundDataField DataFieldName="FirstName" Header-Text="First Name" Key="FirstName" CssClass="RAlign" > <Header Text="First Name" /></ig:BoundDataField>
The font is bold which shows the CssClass is working.
But the text is not right align.
Did I miss anything?
Thanks!
David
Alex- can you demonstrate how to set a class like this in code-behind instead of in the designer? I've tried specifying it like this in the InitializeRow method:
e.Row.Items[i].Column.CssClass = "tbody>tr>td.RAlign";
...but it is not being recognized. Also, which file should contain the css tag? It's not at all clear which one is taking precedence.
Thanks-
Andy
Hi Alex,
Final got it. With:
<style type="text/css"> tbody.igg_Item > tr > td.RAlign { text-align:right; font-weight:bold;} </style>
Hello David,
I just tried it out, works ok for me.
May be there some other style that overrides the text-align setting off the cells? You can try to use Firebug and inspect the TDs of that column to see if there are any other styles on the page that take priority.
After I changed but still not working
In both cases, the font was bold. So I expect the cssclass was applied.
The css class should have a selector like following:
<style type="text/css"> tbody > tr > td.RAlign { text-align:right; font-weight:bold;} </style>