Chapter 22. Drag-and-drop
This chapter covers
- Controlling when dragging and dropping is allowed
- Supporting a multi-item drag-and-drop operation
- Building custom drag-and-drop functionality
- Customizing the drag-and-drop experience
When Flex first came out, drag-and-drop (D&D) set the tone as a key feature, showcasing what Flex-based RIAs were capable of providing with minimal integration effort. From a developer’s perspective, Flex’s D&D feature is easy to implement because many native components provide a built-in mechanism to support it. At the same time, you can hook into and override any of the default behavior throughout the stages of the process.
In this book, we want to show you not just how to do something but also why to do something. We don’t want you doing D&D just for the sake of it, or because it’s cool, but because it adds usability.
In traditional web applications, you rely on boatloads of links and buttons to move data—web developers not using modern JavaScript frameworks (like jQuery) tend to forget the D&D concept (in the web context), even though they use it every day on the desktop side of life. And because D&D is so uncommon on the web, even users forget the concept.