Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Guide

This exercise is designed to show how to create a display file capable of drag and drop.

Procedure

  1. Open the Profound UI Visual Designer, start with a new display file and name the record format SFLCTL1.
  2. Add an exit button bound to an indicator named EXIT.
  3. Add two subfiles with output fields as shown below.
  4. Set the id of the first subfile to Grid1 and the second subfile to Grid2
  5. Set the record format name of the first subfile (Grid1) to SFLA and the second subfile (Grid2) to SFLB.
  6. The output fields in the 2 subfiles should be bound to FIELDA and FIELDB respectively. These fields are 20A.
  7. Bind an indicator named SFLCLR to the "clear subfile" property of both subfiles. (The same indicator can be used with both subfiles.)
  8. For both subfiles, set the properties as shown:
  9. Select the SFTCTL1 record format and bind the following fields to the properties shown:
  10. Save the display file as DRAGD and compile it to your library.
  11. Compile the code below into your home library.

     

            

 


 


Properties

Allow Drag

This property determines if the element can be drag and dropped.

Promptable? DROPDOWN
Possible Values: True, False
Bindable? YES
Product: ProfoundUI

Use Proxy

This property determinse if a drag and drop proxy is created. If set to true, instead of dragging the element around, a proxy element is created and moved instead.

Promptable? DROPDOWN
Possible Values: True, False
Bindable? YES
Product: ProfoundUI

OnDragStart

Initiates a client-side script when the user first starts to drag the element. Information about the drag and drop operation is provided using the global pui.dragDropInfo object.

Promptable? YES
Possible Values: Any valid JavaScript code
Bindable? NO
Product: ProfoundUI

Drop Targets

Specifies a list of target id's, which identify where this element can be dropped.

Promptable? YES
Possible Values: Comma separated list of element id's
Bindable? YES
Product: ProfoundUI

OnDragEnter

Initiates a client-side script when the user drags an element over a validdrop target during a drag operation. Information about the drag and drop operation is provided using the global pui.dragDropInfo object.

Promptable? YES
Possible Values: Any valid JavaScript code
Bindable? NO
Product: ProfoundUI

Unknown macro: {html}

<div class="pagebreak"/>

OnDragLeave

Initiates aclient-side script when the user moves an element out of a valid drop target during a drag operation. Invormatio about the drag and drop operation is provided using the global pui.dragDropInfo object.

Promptable? YES
Possible Values: Any valid JavaScript code
Bindable? NO
Product: ProfoundUI

OnDrop

Initiates a client-side script when the mouse is released during a drag and drop operation. Information aobut the drag and drop operation is provided using the global pui.dragDropInfo object.

Promptable? YES
Possible Values: Any valid JavaScript code
Bindable? NO
Product: ProfoundUI

Unknown macro: {html}

<div class="pagebreak"/>

pui.dragDropInfo

Overview

pui.dragDropInfo is a global object containing information about the drag/drop operation. This object is available on the following events Ondrop, Ondragleave, Ondragstart, and Ondragenter.

Retrieving Data

You can retrieve data from the global object by placing a property value within the object. The object contains a number of properties, but the most useful are listed below.

For example:

pui.dragDropInfo["target record number"]

Useful Properties

dd element id - This property returns the element id of the selected subfile record.

dd record number - Returns the relative record number of the selected element to drag/drop.

target element id - This returns the target element id of the where the selection is to be dropped.

target record number - This returns the relative record number of where the selection is after it has been dropped.

 

 

  • No labels