Link to home
Start Free TrialLog in
Avatar of zimmer9
zimmer9Flag for United States of America

asked on

I am trying to right justify a column in a GRIDVIEW. I use the following code in my .ASPX file but the values are not being right justified.

I am developing an application in ASP.NET and I am trying to right justify a column in a GRIDVIEW. I use the following code in my .ASPX file but the values are not being right justified. Do you know how I can resolve this issue?

<ItemStyle HorizontalAlign="Right"></ItemStyle>
                 </asp:TemplateField>

                <asp:TemplateField HeaderText="Amount" ItemStyle-HorizontalAlign="Right">
                    <EditItemTemplate>                                        
                               <asp:TextBox ID="txtamount"  runat="server" Text='<%# Eval("amount") %>'></asp:TextBox>                    
                    </EditItemTemplate>
                    <ItemTemplate>
                         <asp:Label ID="lblamount" runat="server" Text='<%# Eval("amount") %>'></asp:Label>
                     </ItemTemplate>
ASKER CERTIFIED SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia 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