Centering Data in a column

2 posts, 0 answers
  1. Arun
    Arun avatar
    2 posts
    Member since:
    Mar 2019

    Posted 15 Mar 2019 Link to this post

    I am porting a project that uses the ancient telerikMvcExtensions . I am looking for a replacement for column.Centered() .  I guess my question is how do we align data in a column or apply styles to it ? Would this be through Template or Client Template? If so, can i see an example. Thanks
  2. Eyup
    Admin
    Eyup avatar
    4079 posts

    Posted 18 Mar 2019 Link to this post

    Hello Arun,

    You can use one of these options to achieve this requirement:
    columns.Bound(p => p.ShipName).HtmlAttributes(
        new { style = "text-align: center;", @class = "alternativeApproach" });

    CSS:
    <style>
        .alternativeApproach {
            text-align: center;
        }
    </style>

    I hope this will prove helpful

    Regards,
    Eyup
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top