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

Defines the fluent API for configuring the TileLayoutContainer settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class TileLayoutContainerBuilder

Inheritance: objectTileLayoutContainerBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public TileLayoutContainerBuilder(TileLayoutContainer settings)
Parameters:settingsTileLayoutContainer

The TileLayoutContainer

Methods

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

C#
public TileLayoutContainerBuilder BodyTemplate(string value)
Parameters:valuestring

The value that configures the tile content template.

Returns:

TileLayoutContainerBuilder

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

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

C#
public TileLayoutContainerBuilder BodyTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the bodytemplate.

Returns:

TileLayoutContainerBuilder

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

C#
public TileLayoutContainerBuilder BodyTemplateHandler(string value)
Parameters:valuestring

The value that configures the tile content template.

Returns:

TileLayoutContainerBuilder

Example:
C#
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Containers(c =&gt; {
c.Add().BodyTemplateHandler("getCard1Template");
})
)
&lt;script&gt;
function getCard1Template() {
return "Daily News";
}
&lt;/script&gt;

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

C#
public TileLayoutContainerBuilder BodyTemplateId(string value)
Parameters:valuestring

The value that configures the tile content template.

Returns:

TileLayoutContainerBuilder

Example:
C#
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Containers(c =&gt; {
c.Add().BodyTemplateId("card1");
})
)
&lt;script id="card1" type="text/x-kendo-template"&gt;
&lt;h3&gt;Daily News&lt;/h3&gt;
&lt;/script&gt;

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

C#
public TileLayoutContainerBuilder BodyTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the tile content template.

Returns:

TileLayoutContainerBuilder

Example:
C#
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Containers(c =&gt; {
c.Add().BodyTemplateView(Html.Partial("TileTemplateView"));
})
)

Specifies how many columns the tile item must span.

C#
public TileLayoutContainerBuilder ColSpan(double value)
Parameters:valuedouble

The value that configures the tile item span.

Returns:

TileLayoutContainerBuilder

Example:
C#
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Columns(2)
.Containers(c =&gt; {
c.Add().BodyTemplateId("views-chart-template").ColSpan(1);
})
)

Defines the configuration settings for the tile header.

C#
public TileLayoutContainerBuilder Header(Action<TileLayoutContainerHeaderSettingsBuilder> configurator)
Parameters:configuratorAction<TileLayoutContainerHeaderSettingsBuilder>

The action that configures the header settings.

Returns:

TileLayoutContainerBuilder

Example:
C#
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Containers(c =&gt; {
c.Add().Header(h =&gt; h.Text("Page Views")).BodyTemplateId("views-chart-template");
})
)

Specifies how many rows the tile item must span.

C#
public TileLayoutContainerBuilder RowSpan(double value)
Parameters:valuedouble

The value that configures the tile item span.

Returns:

TileLayoutContainerBuilder

Example:
C#
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.RowsHeight("235px")
.Containers(c =&gt; {
c.Add().BodyTemplateId("views-chart-template").RowSpan(1);
})
)