New to Telerik UI for ASP.NET Core? Download free 30-day trial

Aligning a Numeric Column to the Right

Environment

Product Progress® Telerik® UI for ASP.NET Core Grid

Description

How can I align a numeric column in the Telerik UI for ASP.NET Core Grid?

Solution

Add a custom class for the needed columns. Apply the appropriate styles using the class name selector.

<column field="UnitPrice" title="Unit Price" html-attributes='new Dictionary<string, object>{ ["class"] = "numericColumn" }'/>

<style>
    .numericColumn {
        text-align: right;
    }
</style>    

More ASP.NET Core Grid Resources

See Also

In this article