This is a migrated thread and some comments may be shown as answers.

RagGrid RadNumericTextBox aligns text to left

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brijen
Top achievements
Rank 1
Brijen asked on 19 Jul 2013, 03:04 PM
We are using the Radgrid and the problem is lines are sorted by the number in the textbox.

Somehow the text in the box gets left aligned and we need it to be right aligned even though in the code we have made right aligned. On mouse over the text starts getting right aligned but when page is reloaded it gets left aligned again.

We are using .net 4 and IE9.

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 22 Jul 2013, 05:14 AM
Hello,

Please try with the below code snippet.

Let me know if any concern.

<style type="text/css">
       .MyClass
       {
           text-align: right;
       }
   </style>
<telerik:GridTemplateColumn>
                  <ItemTemplate>
                      <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" Value='<%# Convert.ToInt32(Eval("ID")) %>'>
                          <EnabledStyle CssClass="MyClass" />
                      </telerik:RadNumericTextBox>
                  </ItemTemplate>
              </telerik:GridTemplateColumn>

also checked below link.

http://www.telerik.com/community/forums/aspnet-ajax/input/radnumerictextbox-align-right.aspx#2421068

Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Brijen
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or