aspnet-js-diagrameditoperation-dot-beforechangeshapetext.md
Identifies the BeforeChangeShapeText operation.
static readonly BeforeChangeShapeText: string
| Type | Description |
|---|---|
| string |
Returns “BeforeChangeShapeText”.
|
The operation parameter returns the BeforeChangeShapeText value if the RequestEditOperation event fired because a user is about to edit a shape’s text.
<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px">
<ClientSideEvents RequestEditOperation="onRequestEditOperation" />
...
function onRequestEditOperation(s, e) {
if(e.operation === DiagramEditOperation.BeforeChangeShapeText) {
if(e.args.shape.type === "root") {
if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
showWarning("You cannot change the 'Development' shape's text.");
e.allowed = false;
}
}
...
}
The RequestEditOperation event does not fire for the BeforeChangeShapeText operation if the AllowChangeShapeText property is set to false.
See Also