New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the ListBoxDraggableSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class ListBoxDraggableSettingsBuilder

Inheritance: objectListBoxDraggableSettingsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public ListBoxDraggableSettingsBuilder(ListBoxDraggableSettings settings)
Parameters:settingsListBoxDraggableSettings

Methods

Indicates whether dragging is enabled.

C#
public ListBoxDraggableSettingsBuilder Enabled(bool value)
Parameters:valuebool

The value that configures the enabled.

Returns:

ListBoxDraggableSettingsBuilder

Example:
C#
@(Html.Kendo().ListBox()
.Name("listBox")
.Draggable(d => d.Enabled(true))
)

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.

C#
public ListBoxDraggableSettingsBuilder Hint(string value)
Parameters:valuestring

The value that configures the hint.

Returns:

ListBoxDraggableSettingsBuilder

Example:
C#
@(Html.Kendo().ListBox()
.Name("listBox")
.Draggable(d => d.Hint("Value"))
)

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.

C#
public ListBoxDraggableSettingsBuilder Placeholder(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ListBoxDraggableSettingsBuilder

Example:
C#
@(Html.Kendo().ListBox()
.Name("listBox")
.Draggable(d =&gt; d.Placeholder(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;))
)

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.

C#
public ListBoxDraggableSettingsBuilder Placeholder(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ListBoxDraggableSettingsBuilder

Example:
C#
@(Html.Kendo().ListBox()
.Name("listBox")
.Draggable(d =&gt; d.Placeholder("Value"))
)