Click here to Skip to main content
15,881,516 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using Component one flex grid in my C# application form. I need to add drag drop functionality in the grid. My grid row has folder names which contains files name. My files are stored in SQL Server 2008 database.

Expected behavior

-If grid row is dragged inside grid then row should move up down, i.e Item is moved in different folders.
-If row is dragged outside grid then, if the location is pointing to explorer then files should be exported to the folder,
-If to email draft then it should be attached as a attachment,
-If dragged to supported editor then it should open.

Example Grid

File types can be word document, PPT, Excel, Text file.

-Folder 1
-----File 1
-----File 2
-----File 3
-Folder 2
-----File 4

Problems:

- How to differentiate between Drop is inside or outside the grid.
- At what moment I should fetch file from DB, as file size can differ?
- Is there any possibility to open a new form with some Export details, where user can select export parameters if file is dropped to Outlook or explorer?

What could be the best approach to achieve the requirement?

What I have tried:

I have tried following:

- loading a file from local system and drop using - new DataObject(DataFormats.FileDrop, fileList) is Mouse_move event, but could not differentiate between drop cursor position.
Posted
Comments
BillWoodruff 5-Nov-18 18:20pm    
Why not ask this question on Component One's support facilities ?
Shagoon 6-Nov-18 3:02am    
They do not have anything for this. If we can achieve same using windows grid would either replicate to Component one or would change grid to Windows grid.
BillWoodruff 6-Nov-18 3:41am    
Start here: https://stackoverflow.com/questions/1699504/c-sharp-detect-desktop-folder-mouse-up-during-a-drag-operation
Shagoon 15-Nov-18 0:28am    
Thank you @BillWoodruff it worked.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900