Items Drag and Drop for RadListView for ASP.NET AJAX

Posted by: the telerik blogs, on 10 Feb 2010 | View original | Bookmarked: 0 time(s)

With the 2010.Q1 release, RadListView for ASP.NET AJAX is getting a fancy new client capability. You will be able to drag list view items around and drop them on other HTML elements, similar to RadGrid's row drag & drop functionality.

Item Drag and Drop

Setting up RadListView to enable items drag & drop will be a piece of cake. Besides the usual AllowSomeFunctionality-type of property, all you will need to do will be:

  • Use a CSS marker on an HTML element in the ItemTemplate / AlternatingItemTemplate to mark the bounds of a list view item. The content inside your HTML container marked by this CSS marker will be duplicated into the dragged item.
  • Put a small handle control somewhere in your ItemTemplate / AlternatingItemTemplate. You will be able to initiate item drag by grabbing this handle.

Similarly to RadGrid's RowDrop event, RadListView will fire the server-side ItemDrop event that you can use to get the dragged item, as well as the destination HTML element's client ID.

On the client side, RadListView will expose a couple of client events spanning the life cycle of an item drag action - from drag start to after dropping. These events will give you full control over the drag action - getting and modifying the dragged item and its key values, cancelling an action, preventing postback, etc.

Items Drag and Drop for RadListView will be available in the upcoming 2010.Q1 beta version. Give it a try and let us know what you think about it. Any feedback is more than welcome.

Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 3699 | Hits: 12

Similar Posts

  • Data-binding Telerik CoverFlow for Silverlight + some Routed Commands goodness more
  • Custom Panels in Silverlight/WPF Part 4: Virtualization more
  • Getting and setting max zIndex with jQuery more
  • A new treeview control - ASTreeView for you to use! :) more
  • Multi-Item Drag and Drop RadListBox more
  • Drag and drop items onto RadScheduler for Silverlight more
  • RadDrag&Drop with a Canvas twist more
  • How to create a DropDownList with ASP.NET MVC more
  • Winforms Release History : Q2 2009 SP1 (version 2009.2.9.729) more
  • Using the DragDropService in RadDock more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD