SpreadJS Documentation
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 : Sheet,
   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 GcSpread.Sheets.Comment();
comment.text("new comment!");
comment.backColor("orange");
comment.displayMode(GcSpread.Sheets.DisplayMode.AlwaysShown);
activeSheet.setComment(5,5,comment);

$("#spreadContainer").data("spread").getActiveSheet().bind(GcSpread.Sheets.Events.CommentRemoving, function (e, info) {    
      info.cancel = true;
});
See Also

Reference

Events type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.