ListBoxDraggableSettingsBuilder

Methods

Placeholder(System.String)

Provides a way for customization of the ListBox item placeholder. If a function is supplied, it receives one argument - the draggable element's jQuery object. If placeholder function is not provided the component will clone dragged item, remove its ID attribute, set its visibility to hidden and use it as a placeholder.

Parameters

handler - System.String

The name of the JavaScript function that will be evaluated.

Example

Razor
 
            @(Html.Kendo().ListBox()
                .Name("listBox")
                .Draggable(d => d.Placeholder("Value"))
            )
             

Placeholder(System.Func)

Provides a way for customization of the ListBox item placeholder. If a function is supplied, it receives one argument - the draggable element's jQuery object. If placeholder function is not provided the component will clone dragged item, remove its ID attribute, set its visibility to hidden and use it as a placeholder.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

Example

Razor
 
            @(Html.Kendo().ListBox()
                .Name("listBox")
                .Draggable(d => d.Placeholder(@<text>
                    function(ev) {
                        //event handling code
                     }
                   </text>))
            )
             

Enabled(System.Boolean)

Indicates whether dragging is enabled.

Parameters

value - System.Boolean

The value that configures the enabled.

Example

Razor
 
            @(Html.Kendo().ListBox()
                .Name("listBox")
                .Draggable(d => d.Enabled(true))
            )
             

Hint(System.String)

Provides an option to customize the draggable item hint. If a function is supplied, it receives a single argument - the jQuery object of the draggable element. If a hint is not provided, the ListBox clones the dragged item and uses it as a hint.

Parameters

value - System.String

The value that configures the hint.

Example

Razor
 
            @(Html.Kendo().ListBox()
                .Name("listBox")
                .Draggable(d => d.Hint("Value"))
            )