Kendo.Mvc.UI.Fluent.SortableBuilder

Defines the fluent API for configuring the Kendo UI Sortable

Methods

For(System.String)

The selector to match the DOM element to which the Sortable widget will be instantiated

Parameters

selector System.String

jQuery selector

ContainerSelector(System.String)

Selector that determines the container boundaries in which hint movement will be constrained to.

Parameters

selector System.String

jQuery selector

HintHandler(System.Func<System.Object,System.Object>)

Sets JavaScript function which to return the hint for the sorted item.

HintHandler(System.String)

Sets JavaScript function which to return the hint for the sorted item.

Parameters

handler System.String

JavaScript function name

Hint(System.String)

HTML string representing the the hint element

Parameters

string System.String

Html string

PlaceholderHandler(System.Func<System.Object,System.Object>)

Sets JavaScript function which to return the placeholder for the sorted item.

PlaceholderHandler(System.String)

Sets JavaScript function which to return the placeholder for the sorted item.

Parameters

handler System.String

JavaScript function name

Placeholder(System.String)

HTML string representing the placeholder

Parameters

string System.String

Html string

AutoScroll(System.Boolean)

If set to true the widget will auto-scroll the container when the mouse/finger is close to the top/bottom of it.

Parameters

value System.Boolean

The value for AutoScroll

AutoScroll

If set to true the widget will auto-scroll the container when the mouse/finger is close to the top/bottom of it.

ConnectWith(System.String)

Selector which determines if items from the current Sortable widget can be accepted from another Sortable container(s). The connectWith option describes one way relationship, if the developer wants a two way connection then the connectWith option should be set on both widgets.

Parameters

value System.String

The value for ConnectWith

Cursor(System.String)

The cursor that will be shown while user drags sortable item.

Parameters

value System.String

The value for Cursor

CursorOffset(System.Action<Kendo.Mvc.UI.Fluent.SortableCursorOffsetSettingsBuilder>)

If set, specifies the offset of the hint relative to the mouse cursor/finger. By default, the hint is initially positioned on top of the draggable source offset. The option accepts an object with two keys: top and left.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.SortableCursorOffsetSettingsBuilder>

The configurator for the cursoroffset setting.

Disabled(System.String)

Selector that determines which items are disabled. Disabled items cannot be dragged but are valid sort targets.

Parameters

value System.String

The value for Disabled

Filter(System.String)

Selector that determines which items are sortable. Filtered items cannot be dragged and are not valid sort targets.

Parameters

value System.String

The value for Filter

Handler(System.String)

Selector that determines which element will be used as a draggable handler. If a handler is defined, the user will be able to move the Sortable items only if the cursor/finger is positioned onto the handler element.

Parameters

value System.String

The value for Handler

HoldToDrag(System.Boolean)

Suitable for touch oriented user interface, in order to avoid collision with the touch scrolling gesture. When set to true, the item will be activated after the user taps and holds the finger on the element for a short amount of time. The item will also be activated by pressing, holding and lifting the finger without any movement. Dragging it afterwards will initiate the drag immediately.

Parameters

value System.Boolean

The value for HoldToDrag

HoldToDrag

Suitable for touch oriented user interface, in order to avoid collision with the touch scrolling gesture. When set to true, the item will be activated after the user taps and holds the finger on the element for a short amount of time. The item will also be activated by pressing, holding and lifting the finger without any movement. Dragging it afterwards will initiate the drag immediately.

Ignore(System.String)

Selector that determines which elements inside the sorted item's container will be ignored. Useful if the sortable item contains input elements.

Parameters

value System.String

The value for Ignore

Axis(Kendo.Mvc.UI.SortableAxis)

Represents the Sortable widget Axis

Parameters

value Kendo.Mvc.UI.SortableAxis

The value for Axis

Events(System.Action<Kendo.Mvc.UI.Fluent.SortableEventBuilder>)

Configures the client-side events.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.SortableEventBuilder>

The client events action.

Example (ASPX)

@(Html.Kendo().Sortable()
    .Name("Sortable")
    .Events(events => events
        .Start("onStart")
    )
)