I have a C# WinForms application with a GridView on a Form wich shows records from the database containing blobs (files PDF/JPG/etc.) stored in a database.
I can doubleclick on a row in the grid, to write the blob to disk and open the file. I can single-click on rows to select one or more rows (using ctrl+shift) I can drag files onto the grid to add the files as rows to the grid (and database)
Now I want the user to be able to drag one or more rows from the grid to, for instance, the desktop or a mailclient but cannot figure out in what event to start the 'drag' operation.
When a user selects one or more file he/she does that using the left-mousebutton, dragging uses the same left-mousebutton, both events trigger the mouse-down event. How does one determine what the user is about to do?
I have tried starting the drag operation in the mouse-down event, but that doesn't work if I want to select multiple rows, every time I click on a row a drag operation starts...
how is that handled in the windows explorer for instance? How does one detect what the user is trying to do?