Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
Comment Indicator for Cell in UltraSpreadsheet
posted

We are beginning to add support for Comments in the UltraSpreadsheet.   As you would expect, we would ultimately need to selectively hide/show/edit the comment when a cell is hovered over.   But to start, we are programmaticly creating a comment on all of the cells in one specific spreadsheet column.

As a sanity check, when the spreadsheet is exported to Excel, the comments are visible and can be edited.

The comments do appear to be created successfully using the following code:

///////////////////////////////////////////////////////////////////////////////////////////////////
// 4/1/2018....debug test...add dummy comments...to test for hover, etc.
dummyComment = new WorksheetCellComment ();
dummyComment.Text = new FormattedString ("iDataRow[" + iDataRow + "] iDataCol[" + iDataCol + "] populate_spreadsheed_infragistics line[" + 1176 + "]");
dummyComment.PositioningMode = ShapePositioningMode.MoveWithCells;
dummyComment.Visible = true; // just for testing
Inf_Active_Worksheet.Rows [ iDataRow ].Cells [ iDataCol ].Comment = dummyComment;

The issue is that none of the cells display the 'triangle' indicator.   It there a spreadsheet display setting that needs to be turned on?  One other possible clue, the spreadsheet rows are formatted using one of your standard styles to display alternative color rows.  We are using style 29.   That formatting is performed when the table is first created using the following code:

//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// the key to this is to first set the header/background-foreground and use a style
// that does not change the font color...but has the desired alternating row colors
Login_History_Spreadsheet.SpreadsheetLook.ColumnHeaderBackgroundColor = Color.AntiqueWhite;
Login_History_Spreadsheet.SpreadsheetLook.ColumnHeaderForegroundColor = Color.Black;
theNewTable = theTableRegion.FormatAsTable ( true );
theNewTable.Style = Inf_WorkBook.StandardTableStyles[table_style_index]; // table_style_index is 29