Back to Devexpress

DiagramEditOperation.ChangeConnectorText Property

aspnet-js-diagrameditoperation-dot-changeconnectortext.md

latest1.6 KB
Original Source

DiagramEditOperation.ChangeConnectorText Property

Identifies the ChangeConnectorText operation.

Declaration

ts
static readonly ChangeConnectorText: string

Property Value

TypeDescription
string

Returns “ChangeConnectorText”.

|

Remarks

The operation parameter returns the ChangeConnectorText value if the RequestEditOperation event fired because a user changed a connector’s text.

aspx
<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px">
    <ClientSideEvents RequestEditOperation="onRequestEditOperation" />
    ...
javascript
function onRequestEditOperation(s, e) {
    if(e.operation === DiagramEditOperation.ChangeConnectorText) {
        if(e.args.text === "") {
            if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
                showWarning("A connector text cannot be empty.");
            e.allowed = false;
        }
    }
    ...
}

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

See Also

DiagramEditOperation Class

DiagramEditOperation Members