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

TileLayoutContainerBuilder

Methods

BodyTemplate(System.String)

Defines the template that renders the content of the tile item.

Parameters

value - System.String

The value that configures the tile content template.

Example


             @(Html.Kendo().TileLayout()
               .Name("tilelayout")
               .Containers(c => {
                    c.Add().BodyTemplate("Daily News");
               })
             )

BodyTemplateId(System.String)

Defines the template that renders the content of the tile item.

Parameters

value - System.String

The "id" of the external Kendo UI template.

Example


             @(Html.Kendo().TileLayout()
               .Name("tilelayout")
               .Containers(c => {
                    c.Add().BodyTemplateId("card1");
               })
             )
            <script id="card1" type="text/x-kendo-template">
                <h3>Daily News</h3>
            </script>

BodyTemplateView(System.Web.Mvc.MvcHtmlString)

Defines the template that renders the content of the tile item.

Parameters

value - System.Web.Mvc.MvcHtmlString

The Razor View that will render the template content.

Example


             @(Html.Kendo().TileLayout()
               .Name("tilelayout")
               .Containers(c => {
                    c.Add().BodyTemplateView(Html.Partial("TileTemplateView"));
               })
             )

BodyTemplateHandler(System.String)

Defines the template that renders the content of the tile item.

Parameters

value - System.String

The JavaScript function that will return the template content.

Example


             @(Html.Kendo().TileLayout()
               .Name("tilelayout")
               .Containers(c => {
                    c.Add().BodyTemplateHandler("getCard1Template");
               })
             )
            <script>
                function getCard1Template() {
                    return "Daily News";
                }
            </script>

BodyTemplate(Kendo.Mvc.UI.TemplateBuilder)

Defines the template that renders the content of the tile item.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template content.

Example


             @(Html.Kendo().TileLayout()
               .Name("tilelayout")
               .Containers(c => {
                    c.Add().BodyTemplate(Html.Kendo().Template().AddHtml("<h3>Daily News</h3>"));
               })
             )

ColSpan(System.Double)

Specifies how many columns the tile item must span.

Parameters

value - System.Double

The value that configures the tile item span.

Example


             @(Html.Kendo().TileLayout()
               .Name("tilelayout")
               .Columns(2)
               .Containers(c => {
                    c.Add().BodyTemplateId("views-chart-template").ColSpan(1);
               })
             )

Header(System.Action)

Defines the configuration settings for the tile header.

Parameters

configurator - System.Action<TileLayoutContainerHeaderSettingsBuilder>

The action that configures the header settings.

Example


             @(Html.Kendo().TileLayout()
               .Name("tilelayout")
               .Containers(c => {
                    c.Add().Header(h => h.Text("Page Views")).BodyTemplateId("views-chart-template");
               })
             )

RowSpan(System.Double)

Specifies how many rows the tile item must span.

Parameters

value - System.Double

The value that configures the tile item span.

Example


             @(Html.Kendo().TileLayout()
               .Name("tilelayout")
               .RowsHeight("235px")
               .Containers(c => {
                    c.Add().BodyTemplateId("views-chart-template").RowSpan(1);
               })
             )

In this article
Not finding the help you need?