We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Node add and Node delete events

Thread ID:

Created:

Updated:

Platform:

Replies:

16175 Jul 7,2004 04:35 PM May 6,2005 03:11 PM Windows Forms 7
loading
Tags: Diagram
Rich
Asked On July 7, 2004 04:35 PM

Version 2.0.6.0 of essential suite is going to be released in the next couple of days, will it have any node added and node deleted events in it, or will I need to code these manually?

Prakash S [Syncfusion]
Replied On July 7, 2004 05:05 PM

Hi Richard, The Diagram.Model.ChildrenChangeComplete event can be used to determine whether a node has been added to the diagram. The event''s NodeCollection.EventArgs event argument provides information about the type of change and the affected nodes. As for node deletion, we have this filed as a feature request and we will do our best to add the feature for the next public update of Essential Diagram. For the time being, please workaround this limitation by using the Controller.SelectionList as described in the other post to allow/pre-empt the delete operation -http://www.syncfusion.com/Support/forums/message.aspx?MessageID=15569earlier . Prakash Syncfusion

Administrator [Syncfusion]
Replied On July 9, 2004 03:17 PM

A provision has been added for being notified of node remove/cut commands & cancelling them if necessary: Starting with the next update of Essential Diagram the Diagram.Model.ChildrenChanging event will function as a true cancelable event. In the case of a remove command, the ChildrenChanging event will be generated before the node is actually removed from the diagram, and the event arguments can be examined to determine the type of change(Remove or Insert) and the affected node. The event arg''s Cancel property may then be used to pre-empt the node deletion. Prakash Syncfusion, Inc

Rich
Replied On July 9, 2004 03:39 PM

Thanks Prakash, But I tried the following private void diagramComponent_ChildrenChangeComplete(object sender, Syncfusion.Windows.Forms.Diagram.NodeCollection.EventArgs evtArgs) { evtArgs. } but evtArgs does not expose any functionality (ie. no lists of functions, events, properties when you type "evtArgs."). I also cannot find any doco to support this area, so currently it is of no use. If the answer is not straight forward, could you please provide some examples. Thanks

Administrator [Syncfusion]
Replied On July 9, 2004 04:52 PM

Richard, The event argument for the ChildrenChanging/ChildrenChangeComplete events is of the Syncfusion.Windows.Forms.Diagram.NodeCollection.EventArgs type. The EventArgs class is nested within the Diagram.NodeCollection class and this nested nature of the class appears to be interfering with the VS.NET intellisense support. We will try to get this sorted. The following snippet shows an implementation for the Diagram.ChildrenChangeComplete event handler that verifies whether a new Symbol has been added and if so traces a message. private void diagramComponent_ChildrenChangeComplete(object sender, Syncfusion.Windows.Forms.Diagram.NodeCollection.EventArgs evtArgs) { if((evtArgs.ChangeType == CollectionEx.ChangeType.Insert) && (evtArgs.Node is Symbol)) Trace.WriteLine("New Symbol added"); } The other properties of interest in the NodeCollection.EventArgs type are EventArgs.Nodes that returns an array of Node objects when more than one node is affected by the event. The CollectionEx.ChangeType enumeration is as defined below, /// /// Identifies a type of change made to a collection. /// public enum ChangeType { /// /// One or more items were inserted into the collection /// Insert, /// /// One or more items were removed from the collection /// Remove, /// /// All of the items were removed from the collection /// Clear, /// /// One of the items in the collection was modified /// Set } My apologies for this inconvenience. We will definitely work on improving the documentation in forthcoming versions of the product. Prakash Syncfusion, Inc

Administrator [Syncfusion]
Replied On May 6, 2005 01:40 PM

I''m glad this is still on the message board. Being able to determine when a node is added and get that node, is what I needed to do.

Administrator [Syncfusion]
Replied On May 6, 2005 01:45 PM

And now that I look in the KB I see it there too.

Administrator [Syncfusion]
Replied On May 6, 2005 03:11 PM

Hello! The problem with the intellisense has been addressed in the latest 3.2 release of Essential Diagram. The nested structure has been removed from all the collection classes and related events, and VS.NET intellisense and the Class Reference documentation now correctly pick up the types. Once again, our apologies for the inconvenience that this issue has caused. Regards, Prakash Surendra Syncfusion Inc.,

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;