This question is locked. New answers and comments are not allowed.
                        
                        Hello, 
i was wondering, if there is a simple way to set a maximum number of possible connections for diagram shape connector?
Moreover Is there a way to check actual connections for particular connector?
If there was i guess i could then check those and i could try not to allow user to create additional connection.
Thank you!
                                i was wondering, if there is a simple way to set a maximum number of possible connections for diagram shape connector?
Moreover Is there a way to check actual connections for particular connector?
If there was i guess i could then check those and i could try not to allow user to create additional connection.
Thank you!
9 Answers, 1 is accepted
0
                                Accepted
Hello Rostislav,
Please let us know if this is working for you. Regards,
Miro Miroslavov
the Telerik team
                                         There is no built-in way to restrict the number of connections per Connector, but you can easily achieve this. 
You should handle the ConnectionManipulationStarted/Completed event and in the event arguments, you can check something like the following and mark the event as handled - this will prevent the user from creating the connection:
if (diagram.GetOutgoingConnectionsForShape(e.Shape).Count(c => c.SourceConnectorResult == e.Connector) > 2)            {                e.Handled = true;            }Please let us know if this is working for you. Regards,
Miro Miroslavov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
                                
                                                    Rostislav
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 03 Oct 2012, 10:34 AM
                                            
                                        It works, thank you very much!
                                        0
                                
                                                    Rostislav
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 03 Oct 2012, 10:35 AM
                                            
                                        It works, thank you very much!
                                        0
                                
                                                    Rostislav
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 03 Oct 2012, 10:36 AM
                                            
                                        It works, thank you very much!
0
                                
                                                    Rostislav
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 03 Oct 2012, 10:37 AM
                                            
                                        It works, thank you very much!
                                        0
                                
                                                    Rostislav
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 03 Oct 2012, 10:38 AM
                                            
                                        Hello, 
it works, thank you very much for great support!
                                        it works, thank you very much for great support!
0
                                
                                                    Rostislav
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 03 Oct 2012, 10:40 AM
                                            
                                        It works, thank you very much!
                                        0
                                
                                                    Rostislav
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 03 Oct 2012, 11:24 AM
                                            
                                        It works, thank you very much!
                                        0
                                
                                                    Rostislav
                                                    
                                            
    Top achievements
    
            
                 Rank 1
                Rank 1
            
    
                                                
                                                answered on 03 Oct 2012, 08:20 PM
                                            
                                        It works, thank you!