Free Support Forum - groupdocs.com

How to delete annotations


#1

Please see the demonstration below. Let’s say I make a mistake and want to retract my last action, not just delete the comments related to the annotation but the annotation themselves.


How do I do that?

Demonstration

Best regards
Robert Badi

#2

Hello Robert,

We are sorry to hear that you have this issue. We’ve watched the screencast that you have posted. The “Detele” button that you are trying to click is responsible for deleting the annotation reply (comment), not the annotation itself.
In order to delete annotation you should click on “Delete Annotation” button, but it is absent in your case.

Please see the screenshot below - the red button “Delete Annotation” is responsible for the deleting the annotation.

It is hard to say why “Delete Annotation” is absent in your case without seeing the source code. Please check are you using the “AccessRights” method on the code-front (or on View in case of MVC). If yes, please add one more enumeration value into it - “AnnotationReviewerRights.CanDelete”.

Also there is a way to delete the annotation programmatically, in C# source code:
Groupdocs.Annotation.IAnnotator annotationSvc = ObjectFactory.GetInstance();
var result = annotationSvc.DeleteAnnotation(annotation_ID);


Here “annotation_ID” is an AnnotationID. You can obtain it using the “Id” property from “Groupdocs.Data.Annotation” instance.

If you will have more questions please feel free to contact us.


#3

Hi Denis


Thank you very much. It was the AnnotationReviewerRights.CanDelete that got forgotten.

Best regards
Robert Badi