Row drag tooltip and condition
Hi,
I like to drag&drop items inside the same treeGrid using a Flat-Data.
Now I want to define the information shown in the tooltip wich appears by starting the drag.
And idealy I can change these dynamically, depending on the actual drop position the mouse is hovering over, so the user can see if a drop is allowed or not.
Can you give me a small example hoe to achieve this?
Thank you
Hi Alexander Kuhlmann,
Greetings from Syncfusion support.
To display information during row dragging using a Tooltip, customization of the clone element (dragged row) would be required. Currently, we do not support direct customization of the clone element. However, you can utilize the RowDragStarting event, which provides all the necessary information about the row being dragged.
Additionally, an error element will be displayed to indicate whether the drop is allowed if you attempt to drop the row in an invalid position. You can also customize the appearance of the dropping element through CSS. If you could share more details about your exact requirements, we can prepare a POC sample and share it with you.
If you have further questions, feel free to reach out.
Regards,
Shek
Hi Shek,
thank you for your answer.
In my list there are different types of items, and only one type is allowed to be a drop target. So only this type can have child elements.
With the RowDropping event I can check these condition and cancle the drop event. But I did not found a way to show the user if a drop is allowed or not before dropping an item.
The clone element would be great for this. When I try to drop a row on its own, there I get these information in the clone element. If I understand you right, then there is a way to customise this in the RowDragStarting event. Can you show me how to do this?
Regars,
Alex
Hi Alexander Kuhlmann,
Query#:- When I try to drop a row on its own, there I get these information in the clone element.
Currently, we do not support customizing the clone element during drag-and-drop in the TreeGrid, especially in scenarios using flat data. The primary reason for this limitation is the potential performance impact caused by frequent client-server communications. During drag operations, the mouse movement triggers continuous communication between the client and server. Dynamically updating the clone element at the application end for each movement could introduce significant performance issues.
Due to this, we have not enabled event support for dynamically modifying the clone element based on the drop position. We understand the importance of providing visual feedback during the drag-and-drop process, but at this time, it wouldn’t be feasible to meet this requirement without affecting performance.
Regards,
Farveen sulthana T
- 3 Replies
- 3 Participants
-
AK Alexander Kuhlmann
- Oct 16, 2024 03:53 PM UTC
- Oct 22, 2024 04:39 PM UTC