Tried the HtmlAttributes method on the mvc extensions for listview
@(Html.Kendo().ListView<ViewModel>()
.Name(
"listView"
)
.HtmlAttributes(
new
{ @
class
=
"some-class"
}))
This does not set the class. Also tried "style" and nothing. Might be a bug.
5 Answers, 1 is accepted
0
Hello Adam,
Setting attributes through HtmlAttributes is currently unsupported. However if you can add the class on $(document).ready( /* handler */ ).
Regards,
Nikolay Rusev
the Telerik team
Setting attributes through HtmlAttributes is currently unsupported. However if you can add the class on $(document).ready( /* handler */ ).
Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Matt
Top achievements
Rank 1
answered on 28 Aug 2012, 04:59 AM
Thanks - Are there any plans to support adding HtmlAttributes through the mvc helpers?
0
Hi,
Atanas Korchev
the Telerik team
We plan to add support for HtmlAttributes in the next official release.
Greetings,Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
John
Top achievements
Rank 1
answered on 22 Nov 2012, 11:33 AM
Are HtmlAttributes now supported in the November 2012 release? Need to use them in the TreeView control.
Thanks!
Thanks!
0
Hello John,
Alex Gyoshev
the Telerik team
If you need to set the HtmlAttributes of the root element of the tree, it is supported in the latest internal builds. If you need per-node attributes, you need to use client-side templates and serialize the classes from the server. If you need help with implementing this in your specific scenario, please open a support ticket and send a sample solution that replicates the case.
Greetings,Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!