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.

Request - SelectionChangedComplete

Thread ID:

Created:

Updated:

Platform:

Replies:

28869 May 11,2005 05:10 PM May 25,2005 01:28 PM Windows Forms 4
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On May 11, 2005 05:10 PM

I would like to do something with a selected node once all nodes have been selected. Its not too important, and I have a workaround, but I thought I would suggest it anyways. My workaround is to capture the mouse up event and then grab one of the selected nodes that way.

Administrator [Syncfusion]
Replied On May 12, 2005 05:41 PM

Hi Kevin, The Diagram Controller has the SelectionChanging and SelectionChanged events that are fired when the node selection changes. Will the Controller.SelectionChanged event not work for what you are trying to accomplish in your application? Prakash Syncfusion Inc.,

Administrator [Syncfusion]
Replied On May 12, 2005 10:07 PM

Specifically speaking, it will not work, because the SelectionChanged event is fired for each node being added to the selection list. However, I take back my request, because my workaround is, and would, practically be the same as the SelectionChangedComplete. My problem was that if I select 10 nodes (via the mouse by clicking and dragging), each time one of those nodes is added to the selection list the SelectionChanged event is fired (thus fired 10 times). Essentially, I want to execute a method Foo one time, once all 10 nodes are selected. If you were to add OnSelectionChangedComplete, it would probably be called in SelectTool.cs under IMouseEventReceiver.MouseUp after the ''for each node hit add to list''. But that would be weird calling into the controller like that. Anyways, The method (my workaround) I am using is just listening for the MouseUp event, and then checking the selection list to see if anything is selected, then calling Foo. I am currently just implementing the architecture for the diagram side of our app, and I am tapping into the power you have provided. The diagram alone has saved me 1+ years of development. I''m using VS 2005 B2 and have not had any problems at all.

Administrator [Syncfusion]
Replied On May 18, 2005 02:39 PM

Hi Kevin, I had overlooked a drag selection scenario that involved multiple nodes being selected. The Diagram NodeCollection class has the option to add a range of nodes to the collection, and we have changed the SelectTool behavior to use the NodeCollection''s AddRange method in place of adding nodes individually. This will ensure that the SelectionChanging/SelectionChanged events are fired just once when multiple nodes are selected. The next update of Essential Diagram will ship with the revised code. Thank you bringing this issue to our attention. Regards, Prakash Surendra Syncfusion Inc.,

Administrator [Syncfusion]
Replied On May 25, 2005 01:28 PM

Great! Thanks for the response. I know it is insignificant, but the code update is appreciated.

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.

;