MultiRow Windows Forms > Developer's Guide > Using MultiRow > Rows and Cells > Cell Note |
The GcMultiRow control provides the functionality of cell notes. By adding cell notes, you can display additional information on the grid.
This example uses the CellNote class to add a cell note to a cell.
GcMultiRow1.CurrentCell.Note = New GrapeCity.Win.MultiRow.CellNote() |
gcMultiRow1.CurrentCell.Note = new GrapeCity.Win.MultiRow.CellNote(); |
You can use the GcMultiRow.BeginEditCellNote method to start editing a cell note that is added to the cell.
This example starts editing a cell note.
Dim pos As GrapeCity.Win.MultiRow.CellPosition = GcMultiRow1.CurrentCellPosition Dim cell As GrapeCity.Win.MultiRow.Cell = GcMultiRow1.CurrentCell If cell.Note IsNot Nothing Then GcMultiRow1.BeginEditCellNote(pos) End If |
GrapeCity.Win.MultiRow.CellPosition pos = gcMultiRow1.CurrentCellPosition; GrapeCity.Win.MultiRow.Cell cell = gcMultiRow1.CurrentCell; if (cell.Note != null) { gcMultiRow1.BeginEditCellNote(pos); } |
Set Null as a value in the Cell.Note property to remove a cell note that is added to the cell.
This example removes a cell note.
Dim cell As GrapeCity.Win.MultiRow.Cell = GcMultiRow1.CurrentCell If cell.Note IsNot Nothing Then cell.Note = Nothing End If |
GrapeCity.Win.MultiRow.Cell cell = gcMultiRow1.CurrentCell; if (cell.Note != null) { cell.Note = null; } |
Use the CellNote.DisplayMode property to set the display mode of a cell note.
This example sets the display mode of a cell note.
Imports GrapeCity.Win.MultiRow Dim cell As GrapeCity.Win.MultiRow.Cell = GcMultiRow1.CurrentCell If Cell.Note IsNot Nothing Then If cell.Note.DisplayMode = CellNoteDisplayMode.AlwaysShown Then cell.Note.DisplayMode = CellNoteDisplayMode.HoverShown Else cell.Note.DisplayMode = CellNoteDisplayMode.AlwaysShown End If End If |
using GrapeCity.Win.MultiRow; Cell cell = gcMultiRow1.CurrentCell; if (cell.Note != null) { if (cell.Note.DisplayMode == CellNoteDisplayMode.AlwaysShown) { cell.Note.DisplayMode = CellNoteDisplayMode.HoverShown; } else { cell.Note.DisplayMode = CellNoteDisplayMode.AlwaysShown; } } |
Use the CellNote.Style property to set the style of a cell note.
This example sets the cell note style.
Imports GrapeCity.Win.MultiRow Dim cellNote As CellNote = New CellNote() cellNote.Style.BackColor = Color.Azure cellNote.Style.ForeColor = Color.Blue cellNote.Text = "Cell Note" ' Border style cellNote.Style.LineColor = Color.Red cellNote.Style.LineStyle = CellNoteLineStyle.Thin cellNote.Style.LineWidth = 5 ' Color of the triangle symbol cellNote.Style.TriangleSymbolColor = Color.Blue ' Shadow display cellNote.Style.ShowShadow = MultiRowTriState.True GcMultiRow1.CurrentCell.Note = cellNote |
using GrapeCity.Win.MultiRow; CellNote cellNote = new CellNote(); cellNote.Style.BackColor = Color.Azure; cellNote.Style.ForeColor = Color.Blue; cellNote.Text = "Cell Note"; // Border style cellNote.Style.LineColor = Color.Pink; cellNote.Style.LineStyle = CellNoteLineStyle.Thin; cellNote.Style.LineWidth = 5; // Color of the triangle symbol cellNote.Style.TriangleSymbolColor = Color.Blue; // Shadow display cellNote.Style.ShowShadow = MultiRowTriState.True; gcMultiRow1.CurrentCell.Note = cellNote; |
If the Style property of the cell note is not null, the setting value of the GcMultiRow.DefaultCellNoteStyle property is applied, if the following values are set for each property; otherwise, the value that is set for each property, is applied.
Property | Setting Value |
---|---|
BackColor ForeColor PatternColor LineColor TriangleSymbolColor |
Color.Empty |
Font BackgroundImage ContextMenuStrip |
Null |
LineAdjustment TextEffect Multiline PatternStyle TextAdjustment TextAlign TextVertical BackgroundImageLayout BackgroundGradientEffect UseCompatibleTextRendering WordWrap LineStyle ShowShadow |
Inherit |
Padding | (-1,-1,-1,-1) |
TextAngle LineWidth |
float.NaN |
BackgroundImageOpacity | double.NaN |
TextIndent | -1 |
The default values of the GcMultiRow.DefaultCellNoteStyle property are as follows.
Property | Default Value |
---|---|
BackColor | LightYellow |
ForeColor | Setting value of the ForeColor property of the GcMultiRow control |
Font | Setting value of the Font property of the GcMultiRow control |
BackgroundGradientEffect | Null |
Direction | Center |
BackgroundImage | Null |
BackgroundImageLayout | Tile |
BackgroundImageOpacity | 1 |
LineAdjustment | None |
Multiline | True |
Padding | (0,0,0,0) |
PatternColor | WindowText |
PatternStyle | None |
TextAdjustment | Near |
TextAlign | TopLeft |
TextAngle | 0 |
TextEffect | Flat |
TextIndent | 0 |
TextVertical | False |
UseCompatibleTextRendering | False |
WordWrap | True |
LineColor | Color.Black |
LineStyle | Thin |
LineWidth | 1 |
ShowShadow | Ture |
ContextMenuStrip | Null |
TriangleSymbolColor | Color.Red |
Use the Cell.Note property to add a cell note to a cell.
![]() |
|