Kendo.Mvc.UI.Fluent.ListViewBuilder

Defines the fluent API for configuring the Kendo UI ListView

Methods

BindTo(System.Collections.IEnumerable)

Binds the ListView to a list of objects

Parameters

dataSource System.Collections.IEnumerable

The data source.

Example (ASPX)

<%= Html.Kendo().ListView<Order>()
    .Name("Orders")
    .BindTo((IEnumerable)ViewData["Orders"]);
%>

ClientTemplateId(System.String)

Specifies ListView item template.

Parameters

templateId System.String

The Id of the element which contains the template.

Example (ASPX)

<%= Html.Kendo().ListView<Order>()
    .Name("Orders")
    .ClientTemplateId("listViewTemplate");
%>

ClientAltTemplateId(System.String)

Specifies ListView alt item template.

Parameters

templateId System.String

The Id of the element which contains the template.

Example (ASPX)

<%= Html.Kendo().ListView<Order>()
    .Name("Orders")
    .ClientAltTemplateId("listViewTemplate");
%>

Pageable

Allows paging of the data.

Example (ASPX)

<%= Html.Kendo().ListView()
    .Name("ListView")
    .Ajax(ajax => ajax.Action("Orders", "ListView"))
    .Pageable();
%>

Pageable(System.Action<Kendo.Mvc.UI.Fluent.PageableBuilder>)

Allows paging of the data.

Parameters

pagerAction System.Action<Kendo.Mvc.UI.Fluent.PageableBuilder>

Use builder to define paging settings.

Example (ASPX)

<%= Html.Kendo().ListView()
    .Name("Grid")
    .Ajax(ajax => ajax.Action("Orders", "ListView"))
    .Pageable(paging => paging.Enabled(true))
%>

Selectable

Enables single item selection.

Example (ASPX)

<%= Html.Kendo().ListView()
    .Name("ListView")
    .Selectable()
%>

Editable(System.Action<Kendo.Mvc.UI.Fluent.ListViewEditingSettingsBuilder<T>>)

Configures the ListView editing settings.

Example (ASPX)

<%= Html.Kendo().ListView()
    .Name("ListView")
    .Editable(settings => settings.Enabled(true))
%>

Editable

Enables ListView editing.

Example (ASPX)

<%= Html.Kendo().ListView()
    .Name("ListView")
    .Editable()
%>

AutoBind(System.Boolean)

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

Parameters

value System.Boolean

The value for AutoBind

Navigatable(System.Boolean)

Indicates whether keyboard navigation is enabled/disabled.

Parameters

value System.Boolean

The value for Navigatable

Navigatable

Indicates whether keyboard navigation is enabled/disabled.

TagName(System.String)

Specifies ListView wrapper element tag name.

Parameters

value System.String

The value for TagName

Selectable(System.Action<Kendo.Mvc.UI.Fluent.ListViewSelectableSettingsBuilder<T>>)

Specifies whether item selection is allowed. By default selection is disabled

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.ListViewSelectableSettingsBuilder>

The configurator for the selectable setting.

Selectable(System.Boolean)

Specifies whether item selection is allowed. By default selection is disabled

Parameters

enabled System.Boolean

Enables or disables the selectable option.

Events(System.Action<Kendo.Mvc.UI.Fluent.ListViewEventBuilder>)

Configures the client-side events.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.ListViewEventBuilder>

The client events action.

Example (ASPX)

@(Html.Kendo().ListView()
    .Name("ListView")
    .Events(events => events
        .Cancel("onCancel")
    )
)