Delete selected node

Hi,

I have different items with different templates that user can drop into the diagram from a palette.
One is a simple TextBlock and another is a kind of table as described in the 'Find parent container' post (http://www.nwoods.com/forum/forum_posts.asp?TID=5739&PID=24438&title=find-parent-container#24438).
I have a button in the page that only calls a function to delete the selected nodes in this way:
function DeleteSelection() { myDiagram.allowDelete = true; myDiagram.commandHandler.deleteSelection(); myDiagram.allowDelete = false; };
The strange thing is that all nodes can be deleted but not the node with the table template and I cannot find why.
Andre

I don’t know – CommandHandler.deleteSelection() calls Diagram.removeParts on a collection of all selected Parts for which Part.canDelete() is true, so it really doesn’t care about the type of the Part nor any template. Unless the template sets or binds Part.deletable to false?

Check to see if there are any errors or messages in the console.

Ok,

thanks for the explaination. From the console I saw that (I don't know why) the part.deletable was equals to false.
Setting that to true solved the question.
Thanks for your help and sorry for the stupid question.
Andre