Styling the MVC Grid

Updated over 6 months ago

Environment

ProductThemeBuilder
Product VersionAll versions of ThemeBuilder
3rd-party frameworkTelerik UI for ASP.NET MVC
ComponentsGrid Layout

Description

I am using Telerik UI for MVC and trying to style a Grid layout with ThemeBuilder. The generated styles do not apply correctly. What causes the issue, and how to resolve it?

Solution

Telerik UI for ASP.NET MVC supports and renders various Grid layout modes. Currently, ThemeBuilder supports only a Grid layout created with the scrollable mode. Non-scrollable grids are unsupported, and ThemeBuilder-generated styles may apply incorrectly.

The following example represents a Telerik UI for ASP.NET MVC Grid layout rendered without the Scrollable mode.

c#
@(Html.Kendo().Grid<MyViewModel>()
    .Name("grid")
)

To successfully apply the ThemeBuilder styles, add the Scrollable mode:

c#
@(Html.Kendo().Grid<MyViewModel>()
    .Name("grid")
    .Scrollable() // Enables the Scrollable mode.
)
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support