Spread for ASP.NET 8.0 Product Documentation > Developer's Guide > Customizing User Interaction > Customizing Interaction with Cells > Adding a Note to a Cell |
You can add a note to a cell or range of cells. The note may contain text such as a comment, a question, or documentation describing the origin of the cell's value. When the pointer is over a cell that has a note, the note text displays in a box next to the cell. Notes cannot be placed in cells in the column or row headers.
Set the Note property for the cells in the sheet of the component.
This example code sets the Note property for a range of Cell objects.
C# |
Copy Code
|
---|---|
FpSpread1.Sheets[0].ColumnCount = 4; FpSpread1.Sheets[0].RowCount = 4; FpSpread1.Sheets[0].Cells[1, 1, 3, 3].Note = "This is the note that describes the value."; FpSpread1.Sheets[0].Cells[1, 1, 3, 3].Value = "Value Here"; |
VB |
Copy Code
|
---|---|
FpSpread1.Sheets(0).ColumnCount = 4 FpSpread1.Sheets(0).RowCount = 4 FpSpread1.Sheets(0).Cells(1, 1, 3, 3).Note = "This is the note that describes the value." FpSpread1.Sheets(0).Cells(1, 1, 3, 3).Value = "Value Here" |
Set the Note property for the Cell object for a range of cells.
This example code sets the Note property for a range of Cell objects.
C# |
Copy Code
|
---|---|
FarPoint.Web.Spread.Cell range1; range1 = fpSpread1.ActiveSheetView.Cells[1, 1, 3, 3]; range1.Value = "Value Here"; range1.Note = "This is the note that describes the value."; |
VB |
Copy Code
|
---|---|
Dim range1 As FarPoint.Web.Spread.Cell range1 = fpSpread1.ActiveSheetView.Cells(1, 1, 3, 3) range1.Value = "Value Here" range1.Note = "This is the note that describes the value." |
(Another way of doing that is to select the Cells property and click on the button to call up the Cell, Column, and Row editor and select the cells in that editor.)