4 Answers, 1 is accepted
0
Philip Fourie
Top achievements
Rank 1
answered on 03 Feb 2012, 08:00 PM
I would also like to know how to achieve this. I have tried:
It results in a right-alignment when the input has focus but returns to left-aligned when exiting the control.
Using 2011.3.1115
Thanks,
Philip
Html.Telerik().NumericTextBoxFor(m => m.Units)
.InputHtmlAttributes(new { style = "text-align: right" })
It results in a right-alignment when the input has focus but returns to left-aligned when exiting the control.
Using 2011.3.1115
Thanks,
Philip
0
Philip Fourie
Top achievements
Rank 1
answered on 18 Mar 2012, 07:52 AM
Bump: Is this functionality possible with this control?
0

Eric
Top achievements
Rank 1
answered on 18 May 2012, 06:15 PM
Along with the previously mentioned text-align: right property, adding this css class will produce the desired results:
.t-numerictextbox .t-formatted-value
{
left
:
0
;
right
:
0
;
}
0

Steven
Top achievements
Rank 1
answered on 22 Aug 2012, 08:54 PM
You can also do this:
in your css file add:
.CurrencyBox
{
text-align: right;
left: 0;
right: 0;
}
then in your view your razor statement is:
in your css file add:
.CurrencyBox
{
text-align: right;
left: 0;
right: 0;
}
then in your view your razor statement is:
@Html.Telerik().CurrencyTextBoxFor(m => m.Amount).InputHtmlAttributes(new {@class = "CurrencyBox"})
This way you don't have to override any telerik css styles and possibly affect other elements on other pages....