Edit this page

OnItemDragStarted

This client-side event is fired when a RadListView item is about to be dragged.

Fired by RadListView
Arguments dataKeyValues - Array of the item key fields set through the ClientDataKeyNames property of the RadListView control itemIndex - the index of the dragged item domEvent - dom event
Can be canceled Yes

Example:

<telerik:RadListView ID="RadListView2" runat="server" ClientDataKeyNames="Title, Artist">
    <ClientSettings AllowItemsDragDrop="true">
        <ClientEvents OnItemDragStarted="ItemDragStarted" />
    </ClientSettings>
</telerik:RadListView>
function ItemDragStarted(sender, eventArgs) {
    var title = eventArgs.get_dataKeyValues().Title;
    var artist = eventArgs.get_dataKeyValues().Artist;
    var itemIndex = eventArgs.get_itemIndex();
    alert("Item " + itemIndex + " is about to be dragged with Title - " + title + ", Artist - " + artist);
}
caution

To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel() or set_cancel().