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

MobileListViewBuilder

Methods

BindTo(System.Collections.Generic.IEnumerable)

Binds the MobileListView to a list of objects

Parameters

dataSource - System.Collections.Generic.IEnumerable<T>

The data source.

Example


             @( Html.Kendo().MobileListView<Order>()
                        .Name("Orders")        
                        .BindTo((IEnumerable<Order>)ViewData["Orders"]);
            )

BindTo(System.Collections.IEnumerable)

Binds the MobileListView to a list of objects

Parameters

dataSource - System.Collections.IEnumerable

The data source.

Example


             @( Html.Kendo().MobileListView<Order>()
                        .Name("Orders")        
                        .BindTo((IEnumerable)ViewData["Orders"]);
            )

AppendOnRefresh(System.Boolean)

Used in combination with pullToRefresh. If set to true, newly loaded data will be appended on top when refershing.

Parameters

value - System.Boolean

The value that configures the appendonrefresh.

AutoBind(System.Boolean)

Indicates whether the listview will call read on the DataSource initially.

Parameters

value - System.Boolean

The value that configures the autobind.

DataSource(System.Action)

Instance of DataSource or the data that the mobile ListView will be bound to.

Parameters

configurator - System.Action<AjaxDataSourceBuilder>

The value that configures the datasource.

EndlessScroll(System.Boolean)

If set to true, the listview gets the next page of data when the user scrolls near the bottom of the view.

Parameters

value - System.Boolean

The value that configures the endlessscroll.

FixedHeaders(System.Boolean)

If set to true, the group headers will persist their position when the user scrolls through the listview. Applicable only when the type is set to group, or when binding to grouped datasource.

Parameters

value - System.Boolean

The value that configures the fixedheaders.

HeaderTemplateId(System.String)

The header item template (applicable when the type is set to group).

Parameters

value - System.String

The value that configures the headertemplate.

LoadMore(System.Boolean)

If set to true, a button is rendered at the bottom of the listview, which fetch the next page of data when tapped.

Parameters

value - System.Boolean

The value that configures the loadmore.

LoadMoreText(System.String)

The text of the rendered load-more button (applies only if loadMore is set to true).

Parameters

value - System.String

The value that configures the loadmoretext.

PullTemplateId(System.String)

The message template displayed when the user pulls the listView. Applicable only when pullToRefresh is set to true.

Parameters

value - System.String

The value that configures the pulltemplate.

PullToRefresh(System.Boolean)

If set to true, the listview will reload its data when the user pulls the view over the top limit.

Parameters

value - System.Boolean

The value that configures the pulltorefresh.

RefreshTemplateId(System.String)

The message template displayed during the refresh. Applicable only when pullToRefresh is set to true.

Parameters

value - System.String

The value that configures the refreshtemplate.

ReleaseTemplateId(System.String)

The message template indicating that pullToRefresh will occur. Applicable only when pullToRefresh is set to true.

Parameters

value - System.String

The value that configures the releasetemplate.

ScrollTreshold(System.String)

The distance to the bottom in pixels, after which the listview will start fetching the next page. Applicable only when endlessScroll is set to true.

Parameters

value - System.String

The value that configures the scrolltreshold.

ScrollTreshold(System.Int32)

The distance to the bottom in pixels, after which the listview will start fetching the next page. Applicable only when endlessScroll is set to true.

Parameters

value - System.Int32

The value that configures the scrolltreshold.

Style(System.String)

The style of the control. Can be either empty string(""), or inset.

Parameters

value - System.String

The value that configures the style.

TemplateId(System.String)

The item template.

Parameters

value - System.String

The value that configures the template.

Type(System.String)

The type of the control. Can be either flat (default) or group. Determined automatically in databound mode.

Parameters

value - System.String

The value that configures the type.

Filterable(System.Action)

Indicates whether the filter input must be visible or not.

Parameters

configurator - System.Action<MobileListViewFilterableSettingsBuilder>

The action that configures the filterable.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<MobileListViewEventBuilder>

The client events action.

Example


             @( Html.Kendo().MobileListView<Order>()
                        .Name("MobileListView")
                        .Events(events => events
                            .Click("onClick")
                        )
            )

Items(System.Action)

Builds MobileListView items.

Parameters

action - System.Action<MobileListViewItemFactory>

Action for declaratively building MobileListView items.

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 Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean)

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>

AsChildComponent()

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();
            )

ToHtmlString()

ToClientTemplate()

In this article
Not finding the help you need?