Back to Devexpress

DiagramEditOperation.BeforeChangeShapeText Property

aspnet-js-diagrameditoperation-dot-beforechangeshapetext.md

latest1.6 KB
Original Source

DiagramEditOperation.BeforeChangeShapeText Property

Identifies the BeforeChangeShapeText operation.

Declaration

ts
static readonly BeforeChangeShapeText: string

Property Value

TypeDescription
string

Returns “BeforeChangeShapeText”.

|

Remarks

The operation parameter returns the BeforeChangeShapeText value if the RequestEditOperation event fired because a user is about to edit a shape’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.BeforeChangeShapeText) {
        if(e.args.shape.type === "root") {
            if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
                showWarning("You cannot change the 'Development' shape's text.");
            e.allowed = false;
        }
    }
    ...
}

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

See Also

DiagramEditOperation Class

DiagramEditOperation Members