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

Defines the fluent API for configuring the Kendo ScrollView for ASP.NET MVC.

Definition

Constructors

Initializes a new instance of the ScrollView class.

C#
public ScrollViewBuilder(ScrollView component)
Parameters:componentScrollView

The component.

Methods

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

C#
public ScrollViewBuilder ARIATemplate(string value)
Parameters:valuestring

The value that configures the ariatemplate.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.ARIATemplate("aria-template")
)

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

C#
public ScrollViewBuilder ARIATemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the ariatemplate.

Returns:

ScrollViewBuilder

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

C#
public ScrollViewBuilder ARIATemplateHandler(string value)
Parameters:valuestring

The value that configures the ariatemplate.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.ARIATemplateHandler("template-handler")
)

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

C#
public ScrollViewBuilder ARIATemplateId(string value)
Parameters:valuestring

The value that configures the ariatemplate.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.ARIATemplateId("aria-templateId")
)

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

C#
public ScrollViewBuilder ARIATemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the ariatemplate.

Returns:

ScrollViewBuilder

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

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

C#
public ScrollViewBuilder AutoBind(bool value)
Parameters:valuebool

The value that configures the autobind.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.AutoBind(true)
)

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.

C#
public ScrollViewBuilder BounceVelocityThreshold(double value)
Parameters:valuedouble

The value that configures the bouncevelocitythreshold.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.BounceVelocityThreshold(20)
)

The height of the ScrollView content.

C#
public ScrollViewBuilder ContentHeight(int value)
Parameters:valueint

The value that configures the contentheight.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.ContentHeight(20)
)

The height of the ScrollView content.

C#
public ScrollViewBuilder ContentHeight(string value)
Parameters:valuestring

The value that configures the contentheight.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.ContentHeight("20")
)

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

C#
public ScrollViewBuilder DataSource(Action<ReadOnlyDataSourceBuilder> configurator)
Parameters:configuratorAction<ReadOnlyDataSourceBuilder>

The value that configures the datasource.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.DataSource(d =&gt; d.Ajax())
)
C#
public ScrollViewBuilder DataSource(string dataSourceId)
Parameters:dataSourceIdstringReturns:

ScrollViewBuilder

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

C#
public ScrollViewBuilder Duration(double value)
Parameters:valuedouble

The value that configures the duration.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Duration(20)
)

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

C#
public ScrollViewBuilder EmptyTemplate(string value)
Parameters:valuestring

The value that configures the emptytemplate.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.EmptyTemplate("empty-template")
)

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

C#
public ScrollViewBuilder EmptyTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the emptytemplate.

Returns:

ScrollViewBuilder

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

C#
public ScrollViewBuilder EmptyTemplateHandler(string value)
Parameters:valuestring

The value that configures the emptytemplate.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.EmptyTemplateHandler("emptyTemplateHandler")
)

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

C#
public ScrollViewBuilder EmptyTemplateId(string value)
Parameters:valuestring

The value that configures the emptytemplate.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.EmptyTemplateId("empty-templateId")
)

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

C#
public ScrollViewBuilder EmptyTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the emptytemplate.

Returns:

ScrollViewBuilder

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

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

C#
public ScrollViewBuilder EnablePager(bool value)
Parameters:valuebool

The value that configures the enablepager.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.EnablePager(false)
)

Configures the client-side events.

C#
public ScrollViewBuilder Events(Action<ScrollViewEventBuilder> configurator)
Parameters:configuratorAction<ScrollViewEventBuilder>

The client events action.

Returns:

ScrollViewBuilder

Example:
C#
@( Html.Kendo().ScrollView()
.Name("ScrollView")
.Events(events =&gt; events
.Change("onChange")
)
)

Contains the items of the ScrollView widget

C#
public ScrollViewBuilder Items(Action<ScrollViewItemFactory> configurator)
Parameters:configuratorAction<ScrollViewItemFactory>

The action that configures the items.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Items(x =&gt;
{
x.Add().Content("");
})
)

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

C#
public ScrollViewBuilder Messages(Action<ScrollViewMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<ScrollViewMessagesSettingsBuilder>

The action that configures the messages.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Messages(m =&gt; m.PagerLabel("pager"))
)

If set to true enables the built-in keyboard navigation

C#
public ScrollViewBuilder Navigatable()
Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Navigatable()
)

If set to true enables the built-in keyboard navigation

C#
public ScrollViewBuilder Navigatable(bool value)
Parameters:valuebool

The value that configures the navigatable.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Navigatable(true)
)

The initial page that will be displayed.

C#
public ScrollViewBuilder Page(double value)
Parameters:valuedouble

The value that configures the page.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Page(20)
)

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.

C#
public ScrollViewBuilder Pageable()
Returns:

ScrollViewBuilder

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.

C#
public ScrollViewBuilder Pageable(Action<ScrollViewPageableSettingsBuilder> configurator)
Parameters:configuratorAction<ScrollViewPageableSettingsBuilder>

The action that configures the pageable.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Pageable(p =&gt; p.ARIATemplateId("aria-templateId"))
)

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.

C#
public ScrollViewBuilder Pageable(bool enabled)
Parameters:enabledbool

Enables or disables the pageable option.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Pageable(true)
)

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

C#
public ScrollViewBuilder PagerOverlay(string value)
Parameters:valuestring

The value that configures the pageroverlay.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.PagerOverlay("page-overlay")
)

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

C#
public ScrollViewBuilder Template(string value)
Parameters:valuestring

The value that configures the template.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.Template("template")
)

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

C#
public ScrollViewBuilder Template<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

ScrollViewBuilder

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

C#
public ScrollViewBuilder TemplateHandler(string value)
Parameters:valuestring

The value that configures the template.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.TemplateHandler("template-handler")
)

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

C#
public ScrollViewBuilder TemplateId(string value)
Parameters:valuestring

The value that configures the template.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.TemplateId("templateId")
)

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

C#
public ScrollViewBuilder TemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the template.

Returns:

ScrollViewBuilder

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

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.

C#
public ScrollViewBuilder VelocityThreshold(double value)
Parameters:valuedouble

The value that configures the velocitythreshold.

Returns:

ScrollViewBuilder

Example:
C#
@(Html.Kendo().ScrollView()
.Name("scrollView")
.VelocityThreshold(20)
)