ScrollView

The ScrollView is a widget that enables a user to scroll its content.

Included in: dx.mobile.js, dx.web.js, dx.viz-web.js, dx.all.js
Module: ui/scroll_view
Export: default

You can create the widget using one of the following approaches.

  • jQuery

    JavaScript
    HTML
    $(function() {
        $("#scrollView").dxScrollView({
            height: 500,
            width: 500,
            direction: 'both'
        });
    });
    <div id="scrollView">
        <div id="content"></div>
    </div>
  • Angular

    HTML
    <dx-scroll-view
        [height]="500"
        [width]="500"
        direction="both">
            <div id="content"></div>
    </dx-scroll-view>
  • AngularJS

    HTML
    <div dx-scroll-view="{
        height: 500,
        width: 500,
        direction: 'both'
    }">
        <div id="content"></div>
    </div>
  • Knockout

    HTML
    <div data-bind="dxScrollView: {
        height: 500,
        width: 500,
        direction: 'both'
    }">
        <div id="content"></div>
    </div>
  • ASP.NET MVC Wrappers

    Razor C#
    Razor VB
    @(Html.DevExtreme().ScrollView()
        .ID("scrollView")
        .Height(500)
        .Width(500)
        .Direction(ScrollDirection.Both)
        .Content(@<text>
            <div id="content"></div>
        </text>)
    )
    @Code
        Html.DevExtreme().ScrollView() _
            .ID("scrollView") _
            .Height(500) _
            .Width(500) _
            .Direction(ScrollDirection.Both) _
            .Content(Sub()
                @<text>
                    <div id="content"></div>
                </text>
            End Sub).Render()
    End Code

Note that DevExtreme widgets require linking the jQuery library to your application. The Knockout or AngularJS library is also needed if you use the Knockout or AngularJS approach. For detailed information on linking these libraries to your project, refer to the topics in the Installation section.

View Demo

See Also
Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the ScrollView widget.

Methods

This section describes the members used to manipulate the widget.

Events

This section describes events fired by this widget.