UndoProbinLink

Sir,

we are implementing our UndoManager Class for Implementing Undo/Redo
for Delete Node,Link and etc.

ForExample:we have two node i.e. fromnode and tonode,which are coneected,like

now we delete link between fromnode, tonode.then we have delete link from layout and database.when we have perform Undo operation then create link between fromnode,tonode.which are shown below.

but link is not connected to fromnode.which are shown below

Pl Give me some idea.

thanks

GoView.DeleteSelection does a proper StartTransaction / FinishTransaction, and deleting a link followed by and Undo works in all the samples.

What does your code do to "delete the link"?

sir,

we have saw samples,but we have implementing our UndoManger class.

We have write code for delete the Link:

    GraphLink delLink = gObj as GraphLink;

        GraphNode fromNode = (GraphNode)delLink.FromNode.GoObject;
        GraphNode toNode = (GraphNode)delLink.ToNode.GoObject;
        
        toNode.ParentId = 0;
   
        //Remove link from db
        DataUtils.ExecuteQuery("EXEC Sp_ProvisionLinkDelete " + toNode.NodeId);
        delLink.FromPort.RemoveLink(delLink);
        GoSelection delObjects = new GoSelection(this);

delObjects.Add(gObj);
this.DeleteSelection(delObjects);

where this is the graphview.

thanks.

remove this line of code, I think:

delLink.FromPort.RemoveLink(delLink);