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.

DiagramEditOperation.AddShapeFromToolbox Property

Identifies the AddShapeFromToolbox operation.

Declaration

static readonly AddShapeFromToolbox: string

Property Value

Type Description
string

Returns "AddShapeFromToolbox".

Remarks

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

  • a user starts dragging a shape from the toolbox,
  • the ASPxDiagram control is updating the visibility state of a shape in the context toolbox.

Use the updateUI parameter to identify 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.AddShapeFromToolbox) {
        if(e.args.shape.type !== "employee" && e.args.shape.type !== "team") {
            !e.updateUI && showWarning("You can add only a 'Team' or 'Employee' shape.");
            e.allowed = false;
        }
    }
    ...
}

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

See Also