Skip to main content
All docs
V24.1

ASPxClientDiagramRequestEditOperationEventArgs.allowed Property

Specifies whether the edit operation is allowed.

Declaration

allowed: boolean

Property Value

Type Description
boolean

true to allow the operation to be processed; otherwise, false.
Default value: true

Remarks

function onRequestEditOperation(s, e) {
    if(e.operation === DiagramEditOperation.ResizeShape) {
        if(e.args.newSize.width < 1 || e.args.newSize.height < 0.75) {
            if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
                showWarning("The shape size is too small.");
            e.allowed = false;
        }
    }
    else if(e.operation === DiagramEditOperation.ChangeShapeText) {
        if(e.args.text === "") {
            if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
                showWarning("A shape text cannot be empty.");
            e.allowed = false;
        }
    }
    ...
}

Run Demo: Editing Restrictions

See Also