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

[Solved] How to Right-Align a Grid Column in Kendo MVC

1 Answer 111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
GAM
Top achievements
Rank 1
GAM asked on 13 Jun 2012, 09:31 AM
Hi.

A while back, I raised a support ticket (http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=479807) for the MVC extensions grid, asking how to right-align grid columns. Telerik's answer was to manipulate the column's HtmlAttributes, HeaderHtmlAttributes and FooterHtmlAtributes, to give each a class that would be styled, under CSS, to align appropriately (see below).

var htmlAttributes = new {
                @class =alignment == ColumnAlignment.Left ? "la" : "ra"
        };
        var result =
                columns.Bound("MemberName").Title("Title")
.HtmlAttributes(htmlAttributes).HeaderHtmlAttributes(htmlAttributes).FooterHtmlAttributes(htmlAttributes);
 
I am now trying to port some code across to the new Kendo UI for ASP.NET MVC (Q2 2012 BETA) and the first thing I noticed is that the HtmlAttributes properties appear to have gone. How am I to align my columns under Kendo?

Thanks

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 13 Jun 2012, 10:49 AM
Hello Malcolm,

 HtmlAttributes will be supported for the official release of Kendo UI for ASP.NET MVC.

Regards,
Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
General Discussions
Asked by
GAM
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or