right align

1 Answer 22 Views
NumericTextBox
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
David Ocasio asked on 13 Aug 2021, 01:50 PM
Is it possible to right align text in this editor

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 17 Aug 2021, 05:44 AM

Hi David Ocasio,

To achieve the targeted functionality you can add a CSS style when defining the NumericTextBox. The code in yellow below is what you need to add.

      @(Html.Kendo().NumericTextBox<decimal>()
            .Name("currency")
            .Format("c")
            .Min(0)
            .Max(100)
            .Value(30)
            .HtmlAttributes(new { style = "width: 100%; text-align: right;", title = "currency" })
      )

I hope the suggested approach will help you achieve the targeted behavior in your application. 

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
NumericTextBox
Asked by
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Petar
Telerik team
Share this question
or