Delete all associated nodes


I have Node called RBD(reliability block diagram). If you double click on the RBD node i am opening another GoDocument1 in another MDI Tab.

In new Tab user can enter more nodes and RBD node. This RBD node will create another GODocument2 in new tab and so on…

If you delete the RBD node from document1 i need to delete document2 and so on… if they connected.

I was using GraphView_SelectionDeleting event handler and


This is only deleting linked jobs in same document.

I need override some function goes recursively and delete all associated nodes.

I tried overriding DeleteSelection, EditDelete routines

both of them not working in my case.

Can you suggest any function i can override so it goes and delete each node and Godocument associated with it.

I need to do same thing for copy operation as well.

You can track all the changes to a document at the GoDocument.Changed event. Play with the Update Demo sample app, and search here in the forum for GoDocument.Changed.

Hello Jake,

When i delete the object in GoDocument.Changed event

e.Hint =903 is coming for each node.

I can not find 903 relavent to any value in GoDocument in object browser.

You point which document should i look for the all value for e.hint.

903 is GoLayer.RemovedObject

See GoDocument.RaisedChanged in the Visual Studio help.

Thanks for the help. This is done.

Can you also suggest which event i need to implement when the document gets the focus. As abvious is not going come into changed event.

The GoView is the control, that’s the object that would get focus. Look at the events for the GoView, there should be an Enter event.


Thanks for the help.
GoLayer.RemovedObject is working now for deleting subsystems.
I am working with copying subsystems similar case.
I am using changed event GoLayer.InsertedObject.
When i copy a node it is going into insertedobject which looks not correct.
When i paste a node i am inserting node not while copying.
Can you suggest me what iam doing wrong.


Further to my previous message i am overriding CopyToClipboard function like treeapp when i copy the node.
Still i cannot understand why it is going into insertobect mode.

If you play with the UpdateDemo sample, you won’t see an InsertedObject on a Copy, but you will on a Paste.

So… I don’t understand what you’re seeing.

Hello Jake,

I used treeAPP and implement document_change event.

When ever i copy node to clipboard it is going into change event e.hint is ObjectInsert=902.

Also increasing document counter which is in new document.

Please suggest me how can i fix this

OK, I tried this with TreeApp. I see GoLayer.InsertedObject in goView1_DocumentChanged when I Paste, but not when I Copy.

TreeApp does override CopyToClipboard, but all it does is extend the Collection of objects that are copied (if you have the Copy Trees option on). But that doesn’t change the document.

Actually, an edit-copy operation does insert copies of the current document into a temporary document that is serialized to the system clipboard. So if you overrode a GoDocument method to get change notification, it will be called, but that document will not be the GoView’s document! But if you registered an event handler to get the change notification, it wouldn’t be called for the clipboard’s document.

Hello Walter, Jake

I was using GraphDoc_Changed event in GODocument. Now i understand copying to clipboard is going to temporary document. I can use view_documentchanged event which is working as i expected now.