GrapeCity MultiRow Windows Forms Documentation
ShowIndicator Property
Example 


Gets or sets a value that indicates whether to display row indicators.
Syntax
<SRCategoryAttribute("Appearance")>
<SRDescriptionAttribute("Indicates whether the row indicator is shown.")>
<DefaultValueAttribute()>
Public Property ShowIndicator As Boolean
Dim instance As RowHeaderCell
Dim value As Boolean
 
instance.ShowIndicator = value
 
value = instance.ShowIndicator
[SRCategory("Appearance")]
[SRDescription("Indicates whether the row indicator is shown.")]
[DefaultValue()]
public bool ShowIndicator {get; set;}

Property Value

true to display the row indicator; otherwise, false. The default is true.
Remarks

The following table lists the row indicators and their behavior.

Indicators Description
Arrow indicator If the row containing the RowHeaderCell is the current row, then the RowHeaderCell shows an arrow indicator.
Pen indicator When ShowEditingIcon is true, and a cell is being modified by a UI operation, the RowHeaderCell in the current row shows a pen indicator.
Star indicator If the row containing the RowHeaderCell is an automatically added new row, then the RowHeaderCell shows a star indicator.
Arrow and Star indicator If the row containing the RowHeaderCell is an automatically added new row and is also the current row, then the RowHeaderCell shows an arrow and star indicator.

The RowHeaderCell's indicator changes to an arrow indicator when the current row's cell value is changed by UI editing if the editing is completed while in the current row.

Example
The following code example shows some important properties of row header cells. The RowHeaderCell draws the appearance using the FlatAppearance. Because the ShowIndicator is false, the editing icon and new row icon are not displayed. Although the Row.ErrorText is set, the ShowRowError is false, so the error icon does not display in the RowHeaderCell. This code example is part of a larger example provided for the RowHeaderCell class.
private void Form1_Load(object sender, EventArgs e)
        {
            Template template1 = Template.CreateGridTemplate(10, 80, 21, Int32.MaxValue, AutoGenerateGridTemplateStyles.RowHeader, 50);
            //Set this property, an error icon glyph is displayed on the RowHeaderCell, if RowHeaderCell.ShowRowError is false, no icon is shown.
            template1.Row.ErrorText = "Row Error";

            RowHeaderCell rowHeaderCell1 = template1.Row.Cells[10] as RowHeaderCell;
            //Click the RowHeaderCell, the current row is selected.
            rowHeaderCell1.SelectionMode = MultiRowSelectionMode.Row;
            //Set FlatStyle to Flat, and customize the appearance.
            rowHeaderCell1.FlatStyle = FlatStyle.Flat;
            rowHeaderCell1.FlatAppearance.BorderColor = Color.Black;
            rowHeaderCell1.FlatAppearance.BorderSize = 1;
            rowHeaderCell1.FlatAppearance.MouseDownBackColor = Color.Khaki;
            rowHeaderCell1.FlatAppearance.MouseOverBackColor = Color.Orange;

            rowHeaderCell1.Style.BackColor = Color.DarkKhaki;
            rowHeaderCell1.Style.SelectionBackColor = Color.LightBlue;

            //The editing icon and new row icon do not display.
            rowHeaderCell1.ShowIndicator = false;
            //Set ShowRowError to false to hide the row's error icon.
            rowHeaderCell1.ShowRowError = false;
            //Set the RowHeaderCell's caption. It displays "A1, A2, A3, ...".
            rowHeaderCell1.ValueFormat = "A1";

            gcMultiRow1.Template = template1;
            gcMultiRow1.RowCount = 100;
        }
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        Dim template1 As Template = Template.CreateGridTemplate(10, 80, 21, Int32.MaxValue, AutoGenerateGridTemplateStyles.RowHeader, 50)
        'Set this property, an error icon glyph is displayed on the RowHeaderCell, if RowHeaderCell.ShowRowError is false, no icon is shown.
        template1.Row.ErrorText = "Row Error"

        Dim rowHeaderCell1 As RowHeaderCell = TryCast(template1.Row.Cells(10), RowHeaderCell)
        'Click the RowHeaderCell, the current row is selected.
        rowHeaderCell1.SelectionMode = MultiRowSelectionMode.Row
        'Set FlatStyle to Flat, and customize the appearance.
        rowHeaderCell1.FlatStyle = FlatStyle.Flat
        rowHeaderCell1.FlatAppearance.BorderColor = Color.Black
        rowHeaderCell1.FlatAppearance.BorderSize = 1
        rowHeaderCell1.FlatAppearance.MouseDownBackColor = Color.Khaki
        rowHeaderCell1.FlatAppearance.MouseOverBackColor = Color.Orange

        rowHeaderCell1.Style.BackColor = Color.DarkKhaki
        rowHeaderCell1.Style.SelectionBackColor = Color.LightBlue

        'The editing icon and new row icon do not display.
        rowHeaderCell1.ShowIndicator = False
        'Set ShowRowError to false to hide the row's error icon.
        rowHeaderCell1.ShowRowError = False
        'Set the RowHeaderCell's caption. It displays "A1, A2, A3, ...".
        rowHeaderCell1.ValueFormat = "A1"

        gcMultiRow1.Template = template1
        gcMultiRow1.RowCount = 100
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RowHeaderCell Class
RowHeaderCell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.