TileLayoutBuilder
Methods
Columns(System.Double)
Defines the number of columns.
Parameters
value - System.Double
The value that configures the number of columns.
Example
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Columns(5)
)
ColumnsWidth(System.String)
Determines the width of the columns. The numeric values are treated as pixels.
Parameters
value - System.String
The value that configures the width of the columns.
Example
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.ColumnsWidth("300px")
)
Containers(System.Action)
Defines the TileLayout items and their settings.
Parameters
configurator - System.Action<TileLayoutContainerFactory>
The action that configures the containers.
Example
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Containers(c => {
c.Add().Header(h => h.Text("Page Views")).BodyTemplateId("views-chart-template").ColSpan(3).RowSpan(1);
c.Add().Header(h => h.Text("Conversion Rate")).BodyTemplateId("conversion-rate").ColSpan(1).RowSpan(1);
})
)
Gap(System.Action)
Defines the horizontal and vertical spacing between the layout items.
Parameters
configurator - System.Action<TileLayoutGapSettingsBuilder>
The action that configures the spacing.
Example
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Gap(gap => gap.Rows(30).Columns(20))
)
Height(System.String)
Determines the height of the layout. The numeric values are treated as pixels.
Parameters
value - System.String
The value that configures the height.
Example
@(Html.Kendo().TileLayout()
.Name("tilelayout")
.Height("500")
)
Navigatable(System.Boolean)
Enables the keyboard navigation. By default, the option is disabled.
Parameters
value - System.Boolean
The value that configures the Navigatable option.
Example
@(Html.Kendo().TileLayout()
.Name("tileLayout")
.Navigatable(true)
)
Reorderable()
Determines whether the reordering functionality will be enabled.
Example
@(Html.Kendo().TileLayout()
.Name("tileLayout")
.Reorderable()
)
Reorderable(System.Boolean)
Determines whether the reordering functionality will be enabled.
Parameters
enabled - System.Boolean
Enables or disables the reordering functionality.
Example
@(Html.Kendo().TileLayout()
.Name("tileLayout")
.Reorderable(true)
)
Reorderable(System.Action)
Determines the reordering functionality settings.
Parameters
configurator - System.Action<TileLayoutReorderableSettingsBuilder>
The action that configures the reorderable settings.
Example
@(Html.Kendo().TileLayout()
.Name("tileLayout")
.Reorderable(r => r.ClickMoveClick(true))
)
Resizable(System.Boolean)
Enables the resizing functionality. By default, the option is disabled.
Parameters
value - System.Boolean
The value that configures the Resizable option.
Example
@(Html.Kendo().TileLayout()
.Name("tileLayout")
.Resizable(true)
)
RowsHeight(System.String)
Determines the height of the rows. The numeric values are treated as pixels.
Parameters
value - System.String
The value that configures the height of the rows.
Example
@(Html.Kendo().TileLayout()
.Name("tileLayout")
.RowsHeight("235px")
)
Width(System.String)
Determines the width of the layout. The numeric values are treated as pixels.
Parameters
value - System.String
The value that configures the width.
Example
@(Html.Kendo().TileLayout()
.Name("tileLayout")
.Width("400px")
)
Events(System.Action)
Configures the handled client-side events of the TileLayout.
Parameters
configurator - System.Action<TileLayoutEventBuilder>
The action that configures the available events.
Example
@(Html.Kendo().TileLayout()
.Name("tileLayout")
.Events(events => events.Resize("onResize"))
)
ToComponent()
Returns the internal view component.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name of the component.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
ModelMetadata(System.Web.Mvc.ModelMetadata)
Uses the Metadata of the Model.
Parameters
modelMetadata - System.Web.Mvc.ModelMetadata
The metadata set for the Model
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
Render()
Renders the component.
Example
@(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
@( Html.Kendo().Grid(Model)
.Name("grid")
.DetailTemplate(product => {
)
Product Details:
<div>Product Name: @( product.ProductName )</div>
<div>Units In Stock: @( product.UnitsInStock )</div>
@(
})
.Render();
)
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.