This is a migrated thread and some comments may be shown as answers.

Permissive shape connections

3 Answers 45 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 03 Jun 2019, 07:56 AM

Hi,

I want to restrict which shapes can be connected. In my application there are rules of which shapes may be connected. What I want is that if a user tries to connect two shapes, that cannot be connected (incompatible?) it will reject the connection or display an error on the connection.

Can I do this?

Thx

Rob

3 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 06 Jun 2019, 07:57 AM
Hello Rob,

To cancel connections you can use the ConnectionManipulationCompleted and ConnectionManipulationStarted of the RadDiagram control. To do so, handle the event. For example:
private void RadDiagram_ConnectionManipulationCompleted(object sender, Telerik.Windows.Controls.Diagrams.ManipulationRoutedEventArgs e)
        {
            e.Handled = true;
        }
The ConnectionManipulationCompleted will cancel the attachment of a connection. And the ConnectionManipulationStarted will cancel the drag start.

I hope this helps.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Robert
Top achievements
Rank 1
answered on 06 Jun 2019, 09:18 AM

That looks like exactly what I needed.

Thank you

0
Mark
Top achievements
Rank 1
answered on 02 Sep 2019, 07:29 AM
Yes that helped me too..Thanks a lot 
Tags
Diagram
Asked by
Robert
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Robert
Top achievements
Rank 1
Mark
Top achievements
Rank 1
Share this question
or