GrapeCity.Win.MultiRow Namespace : RowHeaderCell Class |
<FeatureAttribute(Name="Cell", Version="v5.0")> <SRDescriptionAttribute("Displays as a row’s header and provides selection mode and other functions.")> <ToolboxItemFilterAttribute(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom Or _ ToolboxItemFilterType.Prevent Or _ ToolboxItemFilterType.Require)> <ToolboxBitmapAttribute()> <DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.RowHeaderCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")> Public Class RowHeaderCell Inherits HeaderCell
Dim instance As RowHeaderCell
[Feature(Name="Cell", Version="v5.0")] [SRDescription("Displays as a row’s header and provides selection mode and other functions.")] [ToolboxItemFilter(FilterString="GrapeCity.Win.MultiRow.Template7", FilterType=ToolboxItemFilterType.Custom | ToolboxItemFilterType.Prevent | ToolboxItemFilterType.Require)] [ToolboxBitmap()] [Designer(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.RowHeaderCellDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")] public class RowHeaderCell : HeaderCell
The RowHeaderCell class is a special type of HeaderCell. The ValueFormat property in this class is used to represent row information. The RowIndicator property represents the row state.
Notes to Inheritors:
When you derive from RowHeaderCell and add new properties to the derived class, be sure to override the Clone method to copy the new properties during cloning operations. You should also call the base class's Clone method so that the properties of the base class are copied to the new cell.
using System; using System.Windows.Forms; using System.Drawing; namespace GrapeCity.Win.MultiRow.SampleCode { public class RowHeaderCellDemo : Form { private GcMultiRow gcMultiRow1 = new GcMultiRow(); [STAThreadAttribute()] public static void Main() { Application.EnableVisualStyles(); Application.Run(new RowHeaderCellDemo()); } public RowHeaderCellDemo() { this.gcMultiRow1.Dock = DockStyle.Fill; this.Controls.Add(this.gcMultiRow1); this.Load += new EventHandler(Form1_Load); this.Size = new Size(800, 600); this.Text = "RowHeaderCell Demo"; } 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; }
Imports System Imports System.Windows.Forms Imports System.Drawing Imports GrapeCity.Win.MultiRow Public Class RowHeaderCellDemo Inherits Form Private gcMultiRow1 As New GcMultiRow() <STAThreadAttribute()> _ Public Shared Sub Main() Application.EnableVisualStyles() Application.Run(New RowHeaderCellDemo()) End Sub Public Sub New() Me.gcMultiRow1.Dock = DockStyle.Fill Me.Controls.Add(Me.gcMultiRow1) Me.Size = New Size(800, 600) Me.Text = "RowHeaderCell Demo" End Sub 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
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
GrapeCity.Win.MultiRow.Cell
GrapeCity.Win.MultiRow.HeaderCell
GrapeCity.Win.MultiRow.RowHeaderCell
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