This example illustrates how to provide an end-user with the capability to assign comments to different cells (this is similar to the Excel-based feature: Annotate a worksheet by using comments). Here are implementation details:
All comments as stored in the dictionary:
[C#]publicstaticclassCommentsStorage{privatestaticDictionary<Tuple<object,string>,string>Comments...
The first parameter (Tuple) is a compound key value that consists of a row key and column name. The second parameter is a comment text. Although in the current implementation all values are stored in the Session variable, you can easily modify the CommentsStorage class method to store them in the database if necessary.
As for the ASPxGridView-specific implementation part, we handle the ASPxGridView.HtmlDataCellPrepared event to assign the required attributes, CSS styles and client-side event handlers (onmouseover, oncontextmenu) to cells. We customize the Context Menu for rows to display the Insert/Edit/Delete commands for end-users, so that they can modify comments at runtime. Finally, we use two ASPxPopupControl instances to display and edit comments correspondingly.