Provides run-time access to Comment Module and related State

TypeScript
export interface

Methods

MethodDescription
addComment(commentText, cellAddress)Add a Comment to a Comment Thread
addCommentThread(commentThread)Create a new Comment Thread
clearComments()Clear all Comment Threads in the grid
deleteComment(comment, cellAddress)Delete a Comment
deleteCommentThread(cellAddress)Delete all Comments for a particular cell
editComment(comment, cellAddress)Edit a Comment
getAllComments()Return all Comment Threads in the grid
getCommentThreadForCell(cellAddress)Return the Comment Thread for a particular cell
hideCommentsPopup()Close the Comment Popup
setComments(commentThreads)Sets the Comment Threads in the grid

Method Details

addComment

Add a Comment to a Comment Thread

TypeScript
addComment(commentText: string, cellAddress: CellAddress): void;
Parameters
ParameterTypeDescription
commentTextstring
cellAddressCellAddresscell where comment is added
Returns

void

addCommentThread

Create a new Comment Thread

TypeScript
addCommentThread(commentThread: CommentThread): void;
Parameters
ParameterTypeDescription
commentThreadCommentThread
Returns

void

clearComments

Clear all Comment Threads in the grid

TypeScript
clearComments(): void;
Returns

void

deleteComment

Delete a Comment

TypeScript
deleteComment(comment: AdaptableComment, cellAddress: CellAddress): void;
Parameters
ParameterType
commentAdaptableComment
cellAddressCellAddress
Returns

void

deleteCommentThread

Delete all Comments for a particular cell

TypeScript
deleteCommentThread(cellAddress: CellAddress): void;
Parameters
ParameterTypeDescription
cellAddressCellAddress
Returns

void

editComment

Edit a Comment

TypeScript
editComment(comment: AdaptableComment, cellAddress?: CellAddress): void;
Parameters
ParameterTypeDescription
commentAdaptableCommentComment to edit
cellAddressCellAddressLocation of the comment, if not provided all comments will be traversed to find the comment
Returns

void

getAllComments

Return all Comment Threads in the grid

TypeScript
getAllComments(): CommentThread[];
Returns

CommentThread[]

getCommentThreadForCell

Return the Comment Thread for a particular cell

TypeScript
getCommentThreadForCell(cellAddress: CellAddress): CommentThread | undefined;
Parameters
ParameterTypeDescription
cellAddressCellAddress
Returns

CommentThread | undefined

hideCommentsPopup

Close the Comment Popup

TypeScript
hideCommentsPopup(): void;
Returns

void

setComments

Sets the Comment Threads in the grid

TypeScript
setComments(commentThreads: CommentThread[]): void;
Parameters
ParameterTypeDescription
commentThreadsCommentThread[]new cell comments
Returns

void