Using DragDropBlock

Posted by: yianeco on 16 November 2017, 2:56 pm EST

    • Post Options:
    • Link

    Posted 16 November 2017, 2:56 pm EST

    Is there a way to copy the data in cell of target row when dragging and dropping before the drop occurs ?

    For example I am trying to undo a drag and drop of a row to another row position if the other row position contains data. But what ever I do I can only move the row moved back to the old position but the data in the target row are lost because the drop has already taken place.

    It would be nice to have something like BeforeDrop.

    Can you suggest a workaround please. Very urgent.

    Thanks

    Yiannis

  • Posted 19 November 2017, 11:39 pm EST

    Hi Yiannis,

    There is no BeforeDrop event , you can use the DragDropBlock event to get the data from the cell where you are going to drop the dragged cell.

    http://help.grapecity.com/spread/Spread8/WebSiteHelp/webframe.html#events45.html

    Thanks,

    Deepak Sharma

  • Posted 20 November 2017, 5:08 am EST

    Hi,

    Thanks for the reply.

    I am not sure how I can do this. When I call a function via DragDropBlock it means that the drop has already taken place.

    So how I can get the data of the target row before actually drop happens ?

    Regards

    Yiannis

  • Posted 20 November 2017, 7:51 pm EST

    Hello Yiannis,

    Please refer to the attached sample application. It gives you the text from the cell where you drop the dragged cell.

    Thanks,

    Deepak SharmaDragDropBlock.zip

  • Posted 23 November 2017, 2:01 am EST

    Hi,

    Thanks for the reply.

    Unfortunately what I want is the opposite. As I said I want to be able to UNDO the drop.

    That is to be able to read what was before the from in the cells in the target line and restore them.

    The example you posted reads the data in the cells after the drop.

    Any other suggestions please ?

    Regards

    Yiannis

  • Posted 27 November 2017, 1:23 am EST

    Hi Yiannis,

    Other than that we only have BeforeRowMove and BeforeColMove but these events only fire when you drag and drop the whole row or column.

    Sorry for the inconvenience.

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels