FlexGrid Drag and Drop II

Posted by: andreas.kren on 9 August 2018, 11:55 am EST

    • Post Options:
    • Link

    Posted 9 August 2018, 11:55 am EST

    I want to allow the user to drop files on my flexgrid. The flexgrid has only one visible column, the other columns are invisible. Currently the grid is databound but I could change that if necessary.

    When the user drops the files (dragged from the explorer), I want to validate the files (only certain extensions are possible). This I have seen in the “DragDrop” example.

    (drag enter event)

    When the files are ok and the user drops them, I want to add a (generated from me) name in the only visible column, copy the file to another folder and only if this works, I want to write the absolute path of the file in a hidden column. All this should work for 1 or more files.

    1. How can I avoid that the c1flexgrid writes the path in the dropped cell?
    2. I want the user to able to drop the files somewhere in the grid. The new (from me generated) grid lines will always be at the end of the grid (new lines). No overwriting of existing cells.

    Please help me somehow. Thank you.

  • Posted 10 August 2018, 1:37 am EST

    Hi Andreas,

    You would need to set DropMode to DropModeEnum.Manual, and handle the FileDrop manually.

    Please find the attached sample for implementing the scenario you’ve described.

    Thanks.

    DropFiles.zip

  • Posted 10 August 2018, 3:31 am EST

    Thank you very much. I knew it must be easy. I forgot the DragEnter Event code in the according docu sample. Thanx for your fast help!

Need extra support?

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

Learn More

Forum Channels