You can use the Telerik UI Sortable component for ASP.NET MVC to reorder the items in a ListView by dragging and dropping.
- Overview of the Telerik UI Sortable component for ASP.NET MVC
- Overview of the Telerik UI ListView component for ASP.NET MVC
The Sortable reorders the HTML DOM elements. It does not automatically update the order of the items in the DataSource. This means that you have to explicitly implement the desired behavior.
To reorder the items of the ListView, initialize the Sortable on the ListView element. Specify the list items using the
filter property -- select all elements that are direct children of the ListView content element, for example,
.filter(".k-listview-content > div").
If the editing functionality of the ListView is enabled, use a more specific filter selector that excludes the item which is currently in editing mode, for example,
.filter(".k-listview-item > div:not(.k-edit-item)". In this way, the Sortable functionality will not interfere with the editing feature of the ListView.