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. Image for the cookie policy date
close icon

diagram.view.selectionlist is giving first last as threw some exception

I am using essential Diagram control and some nodes.I was trying to get the selection list of nodes from diagram on mouseclick on that node.First click on node gave me the selection list with nodes.But when I clicked again on the node it gave me Argument out of range exception exception like....
"Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index". Screenshot attached
Why this selection list works only once?Can anyone pls help me?

/Sebastain


1 Reply

AD Administrator Syncfusion Team December 8, 2008 03:29 AM UTC

Hi Aida,

In the method, just type the following "IF condition clause":

NodeCollection nd = this.diagram1.View.SelectionList;
if(!nd.IsEmpty)
if (nd.First is Node)
{
MessageBox.Show("Test");
}

Let me know if you need any further clarification in this regard, Thanks!

Happy coding!

- Ajeet


Loader.
Live Chat Icon For mobile
Up arrow icon