Drag and Drop

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
devinst
Profound User
Posts: 80
Joined: Mon Apr 20, 2009 11:26 am
First Name: Devin
Last Name: St. Germain
Company Name: Dupre Logistics, LLC
Phone: 337.314.2259
Address 1: 201 Energy Pkwy. Ste. 500
City: Lafayette
State / Province: Louisiana
Zip / Postal Code: 70508
Country: United States
Contact:

Drag and Drop

Post by devinst »

Is there a way to drag from a single cell in a table rather than the entire record and drop into another input field on the screen?
User avatar
Rob
Profound Logic Staff Member
Posts: 135
Joined: Fri Jan 04, 2008 12:12 pm
First Name: Rob
Last Name: Ferguson
Company Name: Profound Logic Software
Contact:

Re: Drag and Drop

Post by Rob »

When dragging from a subfile, the entire row is "dragged" not an individual cell but if a subfile row is dragged onto an input field, it is possible to populate the field from a predetermined cell (column) in that row because the RRN is available and the subfile record can be retrieved.

So for example, if a row is dragged onto input field A, populate it with the contents of column 3 in that row. If a row is dragged onto input field B, populate it with the contents of column 1 etc.
devinst
Profound User
Posts: 80
Joined: Mon Apr 20, 2009 11:26 am
First Name: Devin
Last Name: St. Germain
Company Name: Dupre Logistics, LLC
Phone: 337.314.2259
Address 1: 201 Energy Pkwy. Ste. 500
City: Lafayette
State / Province: Louisiana
Zip / Postal Code: 70508
Country: United States
Contact:

Re: Drag and Drop

Post by devinst »

The solution sounds wonderful but I am having trouble implementing. My program seems to not reconize droping a record from a subfile onto and input field. If I attempt to drop onto another subfile, all works great. I have put the input fields into the list of targets but do not get any input in to the program when a drop is made. The program acts like nothing happens. Is it possible to drop onto and input field?
User avatar
Alex
Profound Logic Staff Member
Posts: 233
Joined: Fri Jan 04, 2008 12:10 pm
First Name: Alex
Last Name: Roytman
Company Name: Profound Logic Software
Contact:

Re: Drag and Drop

Post by Alex »

Yes, it is possible to drop subfile rows into an input field. I have tested this with a simple example and it works just fine. One thing to watch out for is you must bind a variable to "target element id" under Screen Properties. If you don’t do this, the program will act like nothing happens, just as you describe.
UPI
Profound User
Posts: 30
Joined: Wed Jun 30, 2010 1:37 pm
First Name: Thomas
Last Name: Garvey
Company Name: Unbeaten Path International
Country: United States
Contact:

Re: Drag and Drop

Post by UPI »

What if the target field is an input text field? Can the mouse location in the target field be determined when the user drops the dragged subfile row? For example, you have a text field of 2000 characters and a subfile with commonly used words is displayed. The user selects a row from the subfile and drags it onto the text field and wants it placed into a certain location in the 2000 characters already in the input text field.
Is that doable?
User avatar
Alex
Profound Logic Staff Member
Posts: 233
Joined: Fri Jan 04, 2008 12:10 pm
First Name: Alex
Last Name: Roytman
Company Name: Profound Logic Software
Contact:

Re: Drag and Drop

Post by Alex »

The x, y mouse coordinates can be retrieved using the ondrop event by interrogating the pui.dragDropInfo.event object. This object is a standard JavaScript event and any standard event methods and properties are available. However, to figure out which part of the textbox to update based on mouse coordinates would require significant JavaScript coding.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest