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

Parameters

sheet
The sheet that triggered the event.
sheetName
The sheet's name.
comment
The comment is being removed.
cancel
A value that indicates whether the operation should be canceled.
Example
This example prevents the comment from being removed.
var comment = new GC.Spread.Sheets.Comments.Comment();
comment.text("new comment!");
comment.backColor("orange");
comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
activeSheet.getCell(5,5).comment(comment);

activeSheet.bind(GC.Spread.Sheets.Events.CommentRemoving, function (e, info) {    
      info.cancel = true;
});
See Also

Reference

Events type