Results 1 to 4 of 4

Thread: Drag and drop in grid

  1. #1
    Member
    Join Date
    May 2012
    Posts
    94

    Drag and drop in grid

    Hello, I need (if possible) an Drag and drop function in a grid, so I can move very quickly records from one table to another table;
    Drag, the whole record and in Drop, insert the record in another table.

    Example;
    if in table 1 fields name,date,amount
    Drag creates a matrix;
    dr[1,1]=name
    dr[1,2]=date
    dr[1,3]=amount
    then its very ease to create an function Drop to insert it in another table,record. (or in other fields)

    When possible, it should work on multiple record.

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,682
    Hi Snelsoft,

    A drag and drop operation requires a source object and a target object. What would the drop target be? Another grid, a form, an image on a canvas? Whatever it is we would need a new dragDrop delegate that would be called and somehow the rows would need to be encoded in a way that could be handled by all supported scripting languages.

    Also in drag and drop there are typically two types of drop operation; copy and move. (Possibly shift drag to move). Move copies the selection that was dropped and then removes the selection from the source object e.g a grid section.

    So clearly this requires properly thought out and designed carefully if it is to be truly useful.
    Last edited by barrymavin; 2015-11-27 at 08:51.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Member
    Join Date
    May 2012
    Posts
    94
    Hi Barry, the target after drop action should be another table.

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,682
    Hi Snelsoft, a drag and drop operation is a UI operation not a database table operation so the drag needs to drop onto a UI object such as another grid or an icon or similar UI element.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us