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

ScrollViewBuilder

Methods

ARIATemplate(System.String)

Specifies a template is used to populate an aria-live element that anounces which is the current item.

Parameters

value - System.String

The value that configures the ariatemplate.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .ARIATemplate("aria-template")
            )

ARIATemplateId(System.String)

Specifies a template is used to populate an aria-live element that anounces which is the current item.

Parameters

value - System.String

The value that configures the ariatemplate.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .ARIATemplateId("aria-templateId")
            )

ARIATemplateView(System.Web.Mvc.MvcHtmlString)

Specifies a template is used to populate an aria-live element that anounces which is the current item.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the ariatemplate.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .ARIATemplateView(new Microsoft.AspNetCore.Html.HtmlString("Viewing item #: data.Text # out of #: data.Total #")) 
            )

ARIATemplateHandler(System.String)

Specifies a template is used to populate an aria-live element that anounces which is the current item.

Parameters

value - System.String

The value that configures the ariatemplate.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .ARIATemplateHandler("template-handler")
            )

ARIATemplate(Kendo.Mvc.UI.TemplateBuilder)

Specifies a template is used to populate an aria-live element that anounces which is the current item.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the ariatemplate.

AutoBind(System.Boolean)

If set to false the widget will not bind to the DataSource during initialization.

Parameters

value - System.Boolean

The value that configures the autobind.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .AutoBind(true)
            )

BounceVelocityThreshold(System.Double)

The intensity of the swipe after which the swipe will result in a bounce effect when the user scrolls to the next page. Higher values require more accelerative swipe to notice the bounce effect when a page is changed.

Parameters

value - System.Double

The value that configures the bouncevelocitythreshold.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .BounceVelocityThreshold(20) 
            )

Duration(System.Double)

The duration (in milliseconds) for the ScrollView to snap to the current page after the user releases it.

Parameters

value - System.Double

The value that configures the duration.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .Duration(20)
            )

EmptyTemplate(System.String)

The template for rendering the pages without content. By default, the ScrollView renders a blank page.

Parameters

value - System.String

The value that configures the emptytemplate.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .EmptyTemplate("empty-template") 
            )

EmptyTemplateId(System.String)

The template for rendering the pages without content. By default, the ScrollView renders a blank page.

Parameters

value - System.String

The value that configures the emptytemplate.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .EmptyTemplateId("empty-templateId") 
            )

EmptyTemplateView(System.Web.Mvc.MvcHtmlString)

The template for rendering the pages without content. By default, the ScrollView renders a blank page.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the emptytemplate.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .EmptyTemplateView(new Microsoft.AspNetCore.Html.HtmlString("empty-template-view")) 
            )

EmptyTemplateHandler(System.String)

The template for rendering the pages without content. By default, the ScrollView renders a blank page.

Parameters

value - System.String

The value that configures the emptytemplate.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .EmptyTemplateHandler("emptyTemplateHandler") 
            )

EmptyTemplate(Kendo.Mvc.UI.TemplateBuilder)

The template for rendering the pages without content. By default, the ScrollView renders a blank page.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the emptytemplate.

EnablePager(System.Boolean)

If set to true, the ScrollView will display a pager. By default, the pager is enabled.

Parameters

value - System.Boolean

The value that configures the enablepager.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .EnablePager(false) 
            )

Messages(System.Action)

Defines the messages that are set as aria-lables for the previous and next buttons.

Parameters

configurator - System.Action<ScrollViewMessagesSettingsBuilder>

The action that configures the messages.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .Messages(m => m.PagerLabel("pager"))
            )

If set to true enables the built-in keyboard navigation

Parameters

value - System.Boolean

The value that configures the navigatable.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .Navigatable(true)
            )

Pageable()

If set to true the grid will display a pager. By default paging is disabled.Can be set to a JavaScript object which represents the pager configuration.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .Pageable()
            )

Pageable(System.Boolean)

If set to true the grid will display a pager. By default paging is disabled.Can be set to a JavaScript object which represents the pager configuration.

Parameters

enabled - System.Boolean

Enables or disables the pageable option.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .Pageable(true)
            )

Pageable(System.Action)

If set to true the grid will display a pager. By default paging is disabled.Can be set to a JavaScript object which represents the pager configuration.

Parameters

configurator - System.Action<ScrollViewPageableSettingsBuilder>

The action that configures the pageable.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .Pageable(p => p.ARIATemplateId("aria-templateId"))
            )

Page(System.Double)

The initial page that will be displayed.

Parameters

value - System.Double

The value that configures the page.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .Page(20)
            )

PagerOverlay(System.String)

Sets an overlay background color for the pager. It can be configured to one of the three possible values: - none - no background overlay is set - dark - sets a dark-colored background overlay - light - sets a light-colored background overlay

Parameters

value - System.String

The value that configures the pageroverlay.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .PagerOverlay("page-overlay")
            )

Template(System.String)

The template for rendering the content of the pages. By default, the ScrollView renders a div element for every page.

Parameters

value - System.String

The value that configures the template.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .Template("template")
            )

TemplateId(System.String)

The template for rendering the content of the pages. By default, the ScrollView renders a div element for every page.

Parameters

value - System.String

The value that configures the template.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .TemplateId("templateId")
            )

TemplateView(System.Web.Mvc.MvcHtmlString)

The template for rendering the content of the pages. By default, the ScrollView renders a div element for every page.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the template.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .TemplateView(new Microsoft.AspNetCore.Html.HtmlString("empty-template-view")) 
            )

TemplateHandler(System.String)

The template for rendering the content of the pages. By default, the ScrollView renders a div element for every page.

Parameters

value - System.String

The value that configures the template.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .TemplateHandler("template-handler") 
            )

Template(Kendo.Mvc.UI.TemplateBuilder)

The template for rendering the content of the pages. By default, the ScrollView renders a div element for every page.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template.

VelocityThreshold(System.Double)

The length of the horizontal swipe after which a swipe will navigate to the next page - as opposed to snapping back to the current page. Higher values require long area swipes to navigate to the next page.

Parameters

value - System.Double

The value that configures the velocitythreshold.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .VelocityThreshold(20) 
            )

ContentHeight(System.String)

The height of the ScrollView content.

Parameters

value - System.String

The value that configures the contentheight.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .ContentHeight("20") 
            )

Items(System.Action)

Contains the items of the ScrollView widget

Parameters

configurator - System.Action<ScrollViewItemFactory>

The action that configures the items.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .Items(x =>
                            {
                                x.Add().Content("");
                            })
            )

ContentHeight(System.Int32)

The height of the ScrollView content.

Parameters

value - System.Int32

The value that configures the contentheight.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .ContentHeight(20)
            )

DataSource(System.Action)

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

Parameters

configurator - System.Action<ReadOnlyDataSourceBuilder>

The value that configures the datasource.

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .DataSource(d => d.Ajax())
            )

DataSource(System.String)

Parameters

dataSourceId - System.String

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<ScrollViewEventBuilder>

The client events action.

Example


             @( Html.Kendo().ScrollView()
                        .Name("ScrollView")
                        .Events(events => events
                            .Change("onChange")
                        )
            )

If set to true enables the built-in keyboard navigation

Example


            @(Html.Kendo().ScrollView()
                            .Name("scrollView")
                            .Navigatable(true)
            )

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.

ToHtmlString()

ToClientTemplate()

In this article
Not finding the help you need?