GrapeCity MultiRow Windows Forms Documentation
Section Class
Members  Example 


Represents a linear collection of elements in a GcMultiRow control. This class is abstract (MustInherit in Visual Basic) and so cannot be instantiated.
Object Model
Section ClassGradientEffect StructureBorderBase ClassCellCollection ClassCell ClassCellStyle ClassCellStyle ClassGcMultiRow ClassCellStyle ClassCell ClassGradientEffect StructureGradientEffect StructureMultiRowTouchToolBar Class
Syntax
<DefaultMemberAttribute("Item")>
<DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.SectionDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")>
<ToolboxItemAttribute(ToolboxItemType=, ToolboxItemTypeName="")>
Public MustInherit Class Section 
   Inherits System.ComponentModel.Component
Dim instance As Section
[DefaultMember("Item")]
[Designer(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="GrapeCity.Win.MultiRow.Design.SectionDesigner,GrapeCity.Win.MultiRow.Design, Version=7.20.20141.0, Culture=neutral, PublicKeyToken=0f7a722ee3c2bdd9")]
[ToolboxItem(ToolboxItemType=, ToolboxItemTypeName="")]
public abstract class Section : System.ComponentModel.Component 
Remarks
The Section class represents Cell elements joined together in a section that can be manipulated as a group. Each element is typically an instance of Cell or one of its derived classes. Section is the base class of the Row, ColumnHeaderSection, and ColumnFooterSection classes. There are no public constructors for the Section type, so the only way to access a section is through Rows, ColumnHeaderSections, and ColumnFooterSections in a GcMultiRow control.
Example
The following code example shows how to use the sections. The row, header, and footer are sections. You can change the appearance of the section by changing properties. Try clicking the buttons to test this.
public class SectionDemo : Form
    {
        private GcMultiRow gcMultiRow1 = new GcMultiRow();
        private FlowLayoutPanel panel = new FlowLayoutPanel();

        public SectionDemo()
        {
            this.Text = "Section Demo";
            this.Size = new Size(450, 350);

            // Initial flow layout panel and add to form.
            this.panel.Dock = DockStyle.Left;
            this.panel.Size = new Size(200, 200);
            this.panel.FlowDirection = FlowDirection.TopDown;
            this.panel.WrapContents = false;
            this.panel.Padding = new Padding(5);
            this.Controls.Add(panel);

            // Add MultiRow to form
            this.gcMultiRow1.Dock = DockStyle.Left;
            this.Controls.Add(this.gcMultiRow1);

            this.Load += new EventHandler(Form1_Load);
            
            InitButton();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            gcMultiRow1.Template = Template.Default;

            gcMultiRow1.RowCount = 5;

            // Fill values.
            for (int rowIndex = 0; rowIndex < gcMultiRow1.RowCount; rowIndex++)
            {
                gcMultiRow1[rowIndex, 0].Value = rowIndex.ToString();
            }

            // Keep the values when change MultiRow control's template.
            gcMultiRow1.RestoreValue = true;
        }
Public Class SectionDemo
    Inherits Form
    Private gcMultiRow1 As New GcMultiRow()
    Private panel As New FlowLayoutPanel()

    Public Sub New()
        Me.Text = "Section Demo"
        Me.Size = New Size(450, 350)

        ' Initial flow layout panel and add to form.
        Me.panel.Dock = DockStyle.Left
        Me.panel.Size = New Size(200, 200)
        Me.panel.FlowDirection = FlowDirection.TopDown
        Me.panel.WrapContents = False
        Me.panel.Padding = New Padding(5)
        Me.Controls.Add(panel)

        ' Add MultiRow to form
        Me.gcMultiRow1.Dock = DockStyle.Left
        Me.Controls.Add(Me.gcMultiRow1)
        InitButton()
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        gcMultiRow1.Template = Template.Default

        gcMultiRow1.RowCount = 5

        ' Fill values.
        For rowIndex As Integer = 0 To gcMultiRow1.RowCount - 1
            gcMultiRow1(rowIndex, 0).Value = rowIndex.ToString()
        Next

        ' Keep the values when change MultiRow control's template.
        gcMultiRow1.RestoreValue = True
    End Sub
Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         GrapeCity.Win.MultiRow.Section
            GrapeCity.Win.MultiRow.ColumnFooterSection
            GrapeCity.Win.MultiRow.ColumnHeaderSection
            GrapeCity.Win.MultiRow.Row

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

Section Members
GrapeCity.Win.MultiRow Namespace
ColumnHeaderSection Class
Row Class
ColumnFooterSection Class

 

 


Copyright © GrapeCity, inc. All rights reserved.