A newer version of this page is available. Switch to the current version.

jQuery/JS Common - Object Structures - positionConfig - offset

Specifies horizontal and vertical offset in pixels.

Type:

String

|

Object

This options accepts an object containing the x and y fields which specify the horizontal and vertical offset respectively, or a string consisting of horizontal and vertical offset values separated separated by a space (e.g., "5 -10").

JavaScript
position: { offset: '5 -10' };

When you configure a widget as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control, this option accepts two values of the double type.

Razor C#
Razor VB
@(Html.DevExtreme().WidgetName()
    .Position(p => p
        .Offset(5, -10)
    )
)
@(Html.DevExtreme().WidgetName() _
    .Position(Sub(p)
        p.Offset(5, -10)
    End Sub)
)

x

Specifies the horizontal offset.

Type:

Number

Default Value: 0

y

Specifies the vertical offset.

Type:

Number

Default Value: 0