SpreadJS 13
GC.Spread.Sheets Namespace / Events type / ShapeRemoving Event
The sheet that triggered the event.
The sheet's name.
The shape is being removed.
A value that indicates whether the operation should be canceled.
In This Topic
    ShapeRemoving Event
    In This Topic
    Occurs when the user is removing any shape.
    Syntax
    var instance; // Type: Events
    instance.ShapeRemoving = function(sheet, sheetName, shape, cancel) { };
    ShapeRemoving = function ( 
       sheet : Worksheet,
       sheetName : string,
       shape : Shape,
       cancel : boolean
    ) { };

    Parameters

    sheet
    The sheet that triggered the event.
    sheetName
    The sheet's name.
    shape
    The shape is being removed.
    cancel
    A value that indicates whether the operation should be canceled.
    Example
    //This example uses the ShapeRemoving event.
    var shape = sheet.shapes.add("myShape", GC.Spread.Sheets.Shapes.AutoShapeType.diamond, 0, 90, 200, 200);
    activeSheet.bind(GC.Spread.Sheets.Events.ShapeRemoving, function (e, info) {
            info.cancel = true;// the shape will not remove
    });
    See Also

    Reference

    Events type