All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ASPxClientDiagramRequestEditOperationEventArgs.args Property

Contains information about the processed shape or connector.

Declaration

args: any

Property Value

Type Description
any

An object that contains information about the currently processed shape or connector.

Remarks

The args property's value type depends on the currently being processed operation. The table below lists the available operations, their descriptions, and the corresponding property types.

Operation User action / IU update operation causes the event to be raised Return value's type
AddShape A user is about to add a shape / The control determines the Paste command's visibility. ASPxClientDiagramAddShapeEventArgs
AddShapeFromToolbox A user starts dragging a shape from the toolbox / The control determines the visibility of a shape in the context toolbox. ASPxClientDiagramAddShapeFromToolboxEventArgs
BeforeChangeConnectorText A user is about to edit a connector's text. ASPxClientDiagramBeforeChangeConnectorTextEventArgs
BeforeChangeShapeText A user is about to edit a shape's text. ASPxClientDiagramBeforeChangeShapeTextEventArgs
ChangeConnection A user is about to link or delink a connector from a shape / The control determines a connection point's visibility. ASPxClientDiagramChangeConnectionEventArgs
ChangeConnectorPoints A user changed a connector's points. ASPxClientDiagramChangeConnectorPointsEventArgs
ChangeConnectorText A user changed a connector's text. ASPxClientDiagramChangeConnectorTextEventArgs
ChangeShapeText A user changed a shape's text. ASPxClientDiagramChangeShapeTextEventArgs
DeleteConnector A user is about to delete a connector / The control determines the Cut and Delete commands' visibility. ASPxClientDiagramDeleteConnectorEventArgs
DeleteShape A user is about to delete a shape / The control determines the visibility of the Cut and Delete commands. ASPxClientDiagramDeleteShapeEventArgs
MoveShape A user moved a shape. ASPxClientDiagramMoveShapeEventArgs
ResizeShape A user resized a shape. ASPxClientDiagramResizeShapeEventArgs
function onRequestEditOperation(s, e) {
    if(e.operation === DiagramEditOperation.ResizeShape) {
        if(e.args.newSize.width < 1 || e.args.newSize.height < 0.75) {
            !e.updateUI && showWarning("The shape size is too small.");
            e.allowed = false;
        }
    }
    else if(e.operation === DiagramEditOperation.ChangeShapeText) {
        if(e.args.text === "") {
            !e.updateUI && showWarning("A shape text cannot be empty.");
            e.allowed = false;
        }
    }
    ...
}

Run Demo: Editing Restrictions

See Also