Hi all,
That should be possible.
Set grid.DragDropSettings.OleDropTarget = true, grid.DragDropSettings.OleAcceptFiles = true and when you drop a file on the grid the grid.OnOleDropFile should be triggered.
I had already done this to drag drop a file from Windows Explorer and this works great. But when I try this from my Outlook (365) the grid will not accept the file attached to an Email and the event is not triggered.
We investigated this and it appears that files dragged out of Outlook are handled with a special drag & drop format, different from file dragging from Windows Explorer for example.
We'll need to investigate this specific format and see if it will be feasible to support it in TAdvStringGrid.
Hello!
as I struggle also with this thing, are there any news with this topic?
Currently I use a workaround with "DropEmptyTarget" from Drag and Drop Component Suite. In general it works, I can drop a file on a Row and get the current row by calling
gridMainOverview.MouseToCell(APoint.X, APoint.Y, ACol, ARow);
gridMainOverview.GotoCell(0, ARow);
when the Drop-Event of this Drag&Drop component is fired.
The problem is, the usual Drag&Drop UI behavior doesn't work with this workaround. The cursor doesn´t change to the dragover one and the nice little green arrow in the grid is also not present. I know, this is logical, as the regular AdvStringGrid OleDragDrop behavior is bypassed. But the user doesn´t have an optical response anyway.
Therfore it would be very helpful, if there is an AdvStringGrid internal solution without the need to use a 3rd-party component.
Kind regards
Andreas Moser
Given the very specific nature of this request, best we can do is offer such extension as a paid consulting project. In case of interest, please contact us by direct email.
Thanks for reply, but no need for this.
I've found a rather easy solution to get the same behaviour as for drag&drop from files out of explorer.