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

DevExtreme widgets are integrated with many popular libraries and frameworks. See the Installation section (for JavaScript libraries) or the Prerequisites and Installation section (for ASP.NET MVC framework) to find details on setting up DevExtreme with a particular library or framework.

The following code shows how to create the ScrollView widget using every supported library and framework. For more details on working with widgets in these libraries and frameworks, see the Widget Basics topic for jQuery, Angular, AngularJS, Knockout or ASP.NET MVC.

jQuery
JavaScript
HTML
$(function() {
    $("#scrollView").dxScrollView({
        height: 500,
        width: 500,
        direction: 'both'
    });
});
<div id="scrollView">
    <div id="content"></div>
</div>
Angular
HTML
TypeScript
<dx-scroll-view
    [height]="500"
    [width]="500"
    direction="both">
        <div id="content"></div>
</dx-scroll-view>
import { DxScrollViewModule } from 'devextreme-angular'
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxScrollViewModule
    ],
    // ...
})
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 Controls
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

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.

See Also