Skip to main content
All docs
V25.1
  • DiagramEditOperation.ChangeConnection Property

    Identifies the ChangeConnection operation.

    Declaration

    static readonly ChangeConnection: string

    Property Value

    Type Description
    string

    Returns “ChangeConnection”.

    Remarks

    The operation parameter returns the ChangeConnection value if the RequestEditOperation event fired for the following reasons:

    • user is about to link or delink a connector from a shape,
    • the ASPxDiagram control is updating a visibility state of a connection point.

    Use the reason parameter to identify the reason why the event fired.

    <dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px">
        <ClientSideEvents RequestEditOperation="onRequestEditOperation" />
        ...
    
    function onRequestEditOperation(s, e) {
        if(e.operation === DiagramEditOperation.ChangeConnection) {
            var shapeType = e.args.shape && e.args.shape.type;
            if(shapeType === "root" && e.args.connectorPosition === "End") {
                if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
                    showWarning("The 'Development' shape cannot have an incoming connection.");
                e.allowed = false;
            }
        }
        ...
    }
    

    The RequestEditOperation event does not fire for the ChangeConnection operation if the AllowChangeConnection property is set to false.

    See Also