How to do Cut,Copy and paste on Node

<!–[if gte mso 10]>
<>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:“Table Normal”;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:“Calibri”,“sans-serif”;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:“Times New Roman”;
mso-bidi-theme-font:minor-bidi;
mso-fareast-language:EN-US;}

<![endif]–>

Hi

Is there any way we can do Cut,Copy and paste between nodes.

like Copying particular node and paste it on other node so that nodes from the copied node should be pasted on the Target node.

Lets say

i have

| Node B---->Node D--->Node E--Node M--Node N

Node A --

|Node C ->Node F

refer the above here i want to copy or Cut the Node D and paste it on

Node C .So after past the Node F will have Node D followed by rest of the nodes that is Node E, Node M and Node N

How do the Cut,Copy and Paste

First, I suspect you want to set Diagram.CommandHandler.CopyingInclusions=“SubTree” and .DeletingInclusions=“SubTree”, if you haven’t already. This assumes you have tree-structured graphs. If you don’t, this gets both more complicated to define what you want and more complicated to implement. (The Flowgrammer sample is an example of that, although I don’t recall that it supports copy and paste: just drag-and-drop.)

Second, you’ll want to customize the Diagram.CommandHandler’s operation upon a paste. I’m not sure how your application is organized. I think you’ll want to override CommandHandler.Paste, but perhaps you can get by with an implementation of the Diagram.ClipboardPasted event handler.

Let’s assume you are overriding Paste. First, remember the Diagram.SelectedNode.Data. This data will tell you where to splice the pasted data into your diagram model.

Then call the base method. This will actually copy the clipboard data into the model, create Nodes and Links in the Diagram for that data, and then select those new Nodes and Links.

Finally perform a transaction which adds your desired new link relationship(s) in the model. Remember to handle the case where there’s no selected node.