Angular ScrollView Properties
See Also
- Configure a Widget: Angular | Vue | React | jQuery | AngularJS | Knockout | ASP.NET MVC 5 | ASP.NET Core
direction
Use the ScrollDirection
enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Vertical
, Horizontal
and Both
.
elementAttr
Specifies the attributes to be attached to the widget's root element.
jQuery
$(function(){ $("#scrollViewContainer").dxScrollView({ // ... elementAttr: { id: "elementId", class: "class-name" } }); });
Angular
<dx-scroll-view ... [elementAttr]="{ id: 'elementId', class: 'class-name' }"> </dx-scroll-view>
import { DxScrollViewModule } from "devextreme-angular"; // ... export class AppComponent { // ... } @NgModule({ imports: [ // ... DxScrollViewModule ], // ... })
ASP.NET MVC Controls
@(Html.DevExtreme().ScrollView() .ElementAttr("class", "class-name") // ===== or ===== .ElementAttr(new { @id = "elementId", @class = "class-name" }) // ===== or ===== .ElementAttr(new Dictionary<string, object>() { { "id", "elementId" }, { "class", "class-name" } }) )
@(Html.DevExtreme().ScrollView() _ .ElementAttr("class", "class-name") ' ===== or ===== .ElementAttr(New With { .id = "elementId", .class = "class-name" }) ' ===== or ===== .ElementAttr(New Dictionary(Of String, Object) From { { "id", "elementId" }, { "class", "class-name" } }) )
height
This option accepts a value of one of the following types:
Number
The height in pixels.String
A CSS-accepted measurement of height. For example,"55px"
,"80%"
,"inherit"
.Function
A function returning either of the above. For example:JavaScriptheight: function() { return window.innerHeight / 1.5; }
onDisposing
A function that is executed before the widget is disposed of.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if you use Knockout. |
onInitialized
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
onOptionChanged
Name | Type | Description |
---|---|---|
model |
The model data. Available only if you use Knockout. |
|
fullName |
The path to the modified option that includes all parent options. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
component |
The widget's instance. |
|
name |
The modified option if it belongs to the first level. Otherwise, the first-level option it is nested into. |
|
value | any |
The modified option's new value. |
onPullDown
A function that is executed when the "pull to refresh" gesture is performed. Supported in mobile themes only.
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
The function passed to this option should contain a call to the release() method, which releases the scroll view.
var scrollViewOptions = { onPullDown: function(options){ . . . options.component.release(); } }
onReachBottom
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
model |
The model data. Available only if Knockout is used. |
The function passed to this option should contain a call to the release() method, which releases the scroll view.
var scrollViewOptions = { onReachBottom: function(options){ . . . options.component.release(); } }
onScroll
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
event | Event (jQuery or EventObject) |
The event that caused the function to execute. It is a dxEvent or a jQuery.Event when you use jQuery. |
jQueryEvent |
Use 'event' instead. The jQuery event that caused the handler execution. Deprecated in favor of the event field. |
|
model |
The model data. Available only if Knockout is used. |
|
reachedBottom |
Indicates whether the container's bottom boundary is reached. |
|
reachedLeft |
Indicates whether the container's left boundary is reached. |
|
reachedRight |
Indicates whether the container's right boundary is reached. |
|
reachedTop |
Indicates whether the container's top boundary is reached. |
|
scrollOffset |
The current scroll offset in the following format: { top: topOffset, left: leftOffset }. |
onUpdated
Name | Type | Description |
---|---|---|
component |
The widget's instance. |
|
element |
The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. |
|
event | Event (jQuery or EventObject) |
The event that caused the function to execute. It is a dxEvent or a jQuery.Event when you use jQuery. |
jQueryEvent |
Use 'event' instead. The jQuery event that caused the handler execution. Deprecated in favor of the event field. |
|
model |
The model data. Available only if Knockout is used. |
|
reachedBottom |
Indicates whether the container's bottom boundary is reached. |
|
reachedLeft |
Indicates whether the container's left boundary is reached. |
|
reachedRight |
Indicates whether the container's right boundary is reached. |
|
reachedTop |
Indicates whether the container's top boundary is reached. |
|
scrollOffset |
The current scroll offset in the following format: { top: topOffset, left: leftOffset }. |
pulledDownText
Specifies the text shown in the pullDown panel when pulling the content down lowers the refresh threshold.
pullingDownText
Specifies the text shown in the pullDown panel while pulling the content down to the refresh threshold.
rtlEnabled
When this option is set to true, the widget text flows from right to left, and the layout of elements is reversed. To switch the entire application/site to the right-to-left representation, assign true to the rtlEnabled field of the object passed to the DevExpress.config(config) method.
DevExpress.config({ rtlEnabled: true });
See Also
- Right-to-Left Support Demo: DataGrid | Navigation Widgets | Editors
scrollByContent
A Boolean value specifying whether or not an end-user can scroll the widget content swiping it up or down. Applies only if useNative is false
scrollByThumb
A Boolean value specifying whether or not an end-user can scroll the widget content using the scrollbar.
showScrollbar
Setting this option makes sense only when the useNative option is set to false.
Use the ShowScrollbarMode
enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: OnScroll
, OnHover
, Always
, and Never
.
width
This option accepts a value of one of the following types:
Number
The width in pixels.String
A CSS-accepted measurement of width. For example,"55px"
,"80%"
,"auto"
,"inherit"
.Function
A function returning either of the above. For example:JavaScriptwidth: function() { return window.innerWidth / 1.5; }
If you have technical questions, please create a support ticket in the DevExpress Support Center.