To continue with this content, please log in with your Data Access ID or create a new account.
Cancel Data Access ID
You may not be authorized to see this content. Please contact Data Access Europe for more information.
Cancel Data Access Europe
You are not authorized to see this content.
Cancel Data Access Europe
Next lesson:
The basics how it works
Cancel

The Drag & Drop Framework in DataFlex

Lesson 1 - Drag & Drop capabilities

Before we take a closer look at how the Drag & Drop framework operates, let’s first go through what the capabilities are. The Drag & Drop framework allows you to add logic to your view to extend existing controls with Drag & Drop functionality. While almost all controls will support it in some form, it’s good to know beforehand what you can expect.

We can split the functionality in 2 main categories: Drag actions and Drop actions. A control is capable of a subset of these actions.

Drag actions determine what pieces of a control can be picked up and moved. At the moment, dragging is enabled for the WebList, WebTreeView and WebTagsForm.

  • For the WebList, you can allow a user to pick up and move individual list rows.
  • For the TreeView, users can pick up individual Tree items. You can mark both Folders and / or Items to be draggable.
  • For the Tags Form, individual tags can be picked up and dragged.

Next are Drop Actions. Drop Actions determine where on a control a dragged element can be dropped.

  • Pretty much every Control supports the “Drop on Control” action. Effectively allowing you to drop an element on the entire control itself without any specific position data.
  • For the WebList, elements can be dropped on a specific position in between list rows.
  • For the Tree View, elements can be dropped on either a folder or an item – or both.
  • And finally, for the Tags Form, elements can be dropped at a specific position in the tags form, between tags.

Note that I keep using the term ‘element’ here, for lack of a better word. An element is a piece of a control that you picked up earlier, like a list row or a Tagsform tag.

This doesn’t necessarily have to be from a different control. You can also program the logic in such a way, that you can pick up items and drop them within the same control.

Finally, each drop action also works for files from your filesystem. We’ll go into more detail on this later.