The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
The examples I''ve seen on your website all seem to describe dragging and dropping between a Microsoft treeview control and a syncfusion control.
My question is what would the code look like in the DragDrop Event if I was dragging a node from a syncfusion tree to another syncfusion tree and all I wanted to do was insert a new node in the treeview WITHOUT deleting/moving the node in the original treeview. I want the new node to have the EXACT same label as the original node and cannot figure out how to access the text value of the original node.
Here is a snippet of code within the DragDrop event (taken from your examples).It does not seem to work except if you are dropping the new node onto a Microsoft treeview control. The value of e is always null in the treeview.
Here is the code for the tree which is receiving the new node: Take a look at my dragdrop and comment on what is wrong:
private void tvLeads_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
TreeViewAdv treeViewAdv = sender as TreeViewAdv;
Point ptInTreeadv = treeViewAdv.PointToClient(new Point(e.X, e.Y));
TreeNodeAdv destinationNodeAdv = treeViewAdv.GetNodeAtPoint(ptInTreeadv);
TreeNode sourcenode = e.Data.GetData(typeof(System.Windows.Forms.TreeNode))as TreeNode;
TreeNodeAdv dragnode = new TreeNodeAdv();
dragnode.Text = sourcenode.Text;
destinationNodeAdv.Nodes.Add(dragnode);
destinationNodeAdv.Expand();
}
DTDeepa TS Syncfusion Team October 19, 2005 11:30 AM UTC
Hi timjax,
Please take a look at this sample which reproduces your problem..
tree drag drop
And let me know if this meets your requirement.
Thanks for your interest in Syncfusion products
Thanks for your patience.
Regards,
Deepa.T.S