Skip to main content
All docs
V24.2

DiagramEditOperation.AddShapeFromToolbox Property

Identifies the AddShapeFromToolbox operation.

#Declaration

TypeScript
static readonly AddShapeFromToolbox: string

#Property Value

Type Description
string

Returns “AddShapeFromToolbox”.

#Remarks

The operation parameter returns the AddShapeFromToolbox value if the RequestEditOperation event fired because the ASPxDiagram control is updating the visibility state of a shape in the toolbox or context toolbox.

<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.allowed = false;
        }
    }
    ...
}

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

See Also