aspnet-js-diagrameditoperation-dot-deleteshape.md
Identifies the DeleteShape operation.
static readonly DeleteShape: string
| Type | Description |
|---|---|
| string |
Returns “DeleteShape”.
|
The operation parameter returns the DeleteShape value if the RequestEditOperation event fired for the following reasons:
Use the reason parameter to identify the reason why the event fired.
<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px">
<ClientSideEvents RequestEditOperation="onRequestEditOperation" />
...
if(e.operation === DiagramEditOperation.DeleteShape) {
if(e.args.shape.type === "root") {
if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
showWarning("You cannot delete the 'Development' shape.");
e.allowed = false;
}
...
}
The RequestEditOperation event does not fire for the DeleteShape operation if the AllowDeleteShape property is set to false.
See Also