WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridStackedHeaderDescriptor

    Show / Hide Table of Contents

    Class GridStackedHeaderDescriptor

    Represents a class that implements the GridStackedHeaderDescriptor and declares a StackedHeader column within a StackedHeader row. GridStackedHeaderDescriptor descriptors are managed by the GridStackedHeaderDescriptorCollection which is returned by the Headers property of a GridStackedHeaderRowDescriptor.

    Inheritance
    System.Object
    ShouldSerializeBasedPersisterType
    DescriptorBase
    GridStackedHeaderDescriptor
    Implements
    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    System.ICloneable
    IGridTableCellAppearanceSource
    Inherited Members
    DescriptorBase.Dispose()
    DescriptorBase.OnDisposed(EventArgs)
    DescriptorBase.CanResetValue()
    DescriptorBase.Reset()
    DescriptorBase.ShouldSerialize()
    DescriptorBase.ToString()
    DescriptorBase.Disposing
    DescriptorBase.InDisposed
    DescriptorBase.IsDisposed
    DescriptorBase.Disposed
    ShouldSerializeBasedPersisterType.GetNewAttributesCount(PropertyDescriptor)
    ShouldSerializeBasedPersisterType.AddNewAttributes(PropertyDescriptor, Attribute[], Int32)
    ShouldSerializeBasedPersisterType.GetCustomPDC(PropertyDescriptorCollection)
    ShouldSerializeBasedPersisterType.CheckAllProperties
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Grid.Grouping
    Assembly: Syncfusion.Grid.Grouping.Windows.dll
    Syntax
    public class GridStackedHeaderDescriptor : DescriptorBase, ICustomTypeDescriptor, IDisposable, ICloneable, IGridTableCellAppearanceSource
    Remarks

    Each group in the GridTable has a GridStackedHeaderSection. The StackedHeader section has as many rows as there are GridStackedHeaderRowDescriptors. Each GridStackedHeaderRowDescriptor has a collection of GridStackedHeaderDescriptor columns. The GridStackedHeaderDescriptor defines the VisibleColumns or ColumnSets for which a combined header should be displayed before the normal column headers.

    If you leave the VisibleColumns collection empty than this header will be used as default header for all columns that were not explicitly associated with another header.

    So, if you want to just add an extra Caption then you could add a StackedHeaderRow with only one StackedHeader that has an empty VisibleColumns collection.

    Constructors

    GridStackedHeaderDescriptor()

    Initializes a new empty descriptor.

    Declaration
    public GridStackedHeaderDescriptor()

    GridStackedHeaderDescriptor(String)

    Initializes a new instance of theGridStackedHeaderDescriptor class with a specified name.

    Declaration
    public GridStackedHeaderDescriptor(string name)
    Parameters
    Type Name Description
    System.String name

    The descriptor name which also identifies the GridColumnDescriptor.

    GridStackedHeaderDescriptor(String, GridStackedHeaderVisibleColumnDescriptor[])

    Initializes a new instance of the GridStackedHeaderDescriptor class with a specified name and an array of instances of the GridStackedHeaderVisibleColumnDescriptor class.

    Declaration
    public GridStackedHeaderDescriptor(string name, GridStackedHeaderVisibleColumnDescriptor[] columns)
    Parameters
    Type Name Description
    System.String name

    The descriptor name which also identifies the GridColumnDescriptor.

    GridStackedHeaderVisibleColumnDescriptor[] columns

    The columns that should be displayed as one combined header cell

    GridStackedHeaderDescriptor(String, String)

    Initializes a new instance of theGridStackedHeaderDescriptor class with a specified name and a parent table.

    Declaration
    public GridStackedHeaderDescriptor(string name, string headerText)
    Parameters
    Type Name Description
    System.String name

    The descriptor name which also identifies the GridColumnDescriptor.

    System.String headerText

    The text to be displayed in the grid cell.

    GridStackedHeaderDescriptor(String, String, GridStackedHeaderVisibleColumnDescriptor[])

    Initializes a new instance of theGridStackedHeaderDescriptor class with a specified name, header text and an array of instances of GridStackedHeaderVisibleColumnDescriptor class.

    Declaration
    public GridStackedHeaderDescriptor(string name, string headerText, GridStackedHeaderVisibleColumnDescriptor[] columns)
    Parameters
    Type Name Description
    System.String name

    The descriptor name which also identifies the GridColumnDescriptor.

    System.String headerText

    The text to be displayed in the grid cell.

    GridStackedHeaderVisibleColumnDescriptor[] columns

    The columns that should be displayed as one combined header cell

    GridStackedHeaderDescriptor(String, String, String, GridStackedHeaderVisibleColumnDescriptor[])

    Initializes a new instance of the GridStackedHeaderDescriptor class with a specified name, header text, filter column name and array of instances of GridStackedHeaderVisibleColumnDescriptor class.

    Declaration
    public GridStackedHeaderDescriptor(string name, string headerText, string filtercolname, GridStackedHeaderVisibleColumnDescriptor[] columns)
    Parameters
    Type Name Description
    System.String name

    The descriptor name which also identifies the GridColumnDescriptor.

    System.String headerText

    The text to be displayed in the grid cell.

    System.String filtercolname

    The column based on which this stacked column should be filtered.

    GridStackedHeaderVisibleColumnDescriptor[] columns

    The columns that should be displayed as one combined header cell

    Properties

    Appearance

    Gets or sets the default GridTableCellAppearance with default GridTableCellStyleInfo information for all cell elements that display data of this stackedHeader column.

    Declaration
    public GridTableCellAppearance Appearance { get; set; }
    Property Value
    Type Description
    GridTableCellAppearance

    Collection

    Gets the collection this descriptor belongs to.

    Declaration
    public GridStackedHeaderDescriptorCollection Collection { get; }
    Property Value
    Type Description
    GridStackedHeaderDescriptorCollection

    Engine

    Gets the GridEngine that this StackedHeader descriptor belongs to.

    Declaration
    public GridEngine Engine { get; }
    Property Value
    Type Description
    GridEngine

    HeaderText

    Gets or sets the headerText text to be displayed in the grid.

    Declaration
    public string HeaderText { get; set; }
    Property Value
    Type Description
    System.String

    Name

    Gets or sets the name of this descriptor. This name is used to look up the StackedHeader in the GridStackedHeaderDescriptorCollection.

    Declaration
    public virtual string Name { get; set; }
    Property Value
    Type Description
    System.String

    ParentRow

    Gets the GridStackedHeaderRowDescriptor this StackedHeader belongs to.

    Declaration
    public GridStackedHeaderRowDescriptor ParentRow { get; }
    Property Value
    Type Description
    GridStackedHeaderRowDescriptor

    TableDescriptor

    Gets the TableDescriptor that this descriptor belongs to.

    Declaration
    public GridTableDescriptor TableDescriptor { get; }
    Property Value
    Type Description
    GridTableDescriptor

    VisibleColumns

    Gets the collection of columns that should be displayed as one combined header cell.

    Declaration
    public GridStackedHeaderVisibleColumnDescriptorCollection VisibleColumns { get; }
    Property Value
    Type Description
    GridStackedHeaderVisibleColumnDescriptorCollection

    Methods

    Clone()

    Creates a copy of this descriptor.

    Declaration
    public GridStackedHeaderDescriptor Clone()
    Returns
    Type Description
    GridStackedHeaderDescriptor

    A copy of this descriptor.

    Dispose(Boolean)

    Overrides and manages the unwanted resources.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    DescriptorBase.Dispose(Boolean)

    Equals(Object)

    Determines a value indicating whether the specified System.Object is equal to the current System.Object or not.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The System.Object to compare with the current System.Object.

    Returns
    Type Description
    System.Boolean

    True if the specified System.Object is equal to the current System.Object; Otherwise False.

    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    Gets a hash function for a particular type.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for the current object.

    Overrides
    System.Object.GetHashCode()

    GetName()

    Overrides and gets the descriptor name.

    Declaration
    public override string GetName()
    Returns
    Type Description
    System.String

    Descriptor name.

    Overrides
    DescriptorBase.GetName()

    InitializeFrom(GridStackedHeaderDescriptor)

    Initializes this object and copies properties from another object. PropertyChanging and PropertyChanged events are raised for every property that is modified. If both objects are equal, no events are raised.

    Declaration
    public void InitializeFrom(GridStackedHeaderDescriptor other)
    Parameters
    Type Name Description
    GridStackedHeaderDescriptor other

    The source object.

    OnPropertyChanged(DescriptorPropertyChangedEventArgs)

    Triggered when the PropertyChanged event is done.

    Declaration
    protected virtual void OnPropertyChanged(DescriptorPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    DescriptorPropertyChangedEventArgs e

    A DescriptorPropertyChangedEventArgs contains the event data.

    OnPropertyChanging(DescriptorPropertyChangedEventArgs)

    Triggered when the PropertyChanging event is done.

    Declaration
    protected virtual void OnPropertyChanging(DescriptorPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    DescriptorPropertyChangedEventArgs e

    A DescriptorPropertyChangedEventArgs contains the event data.

    ResetAppearance()

    Discards any changes for the Appearance object.

    Declaration
    public void ResetAppearance()

    ResetHeaderText()

    Resets the headerText text.

    Declaration
    public void ResetHeaderText()

    ShouldSerializeAppearance()

    Determines a value whether Appearance has been modified or not and its contents should be serialized at design-time.

    Declaration
    public bool ShouldSerializeAppearance()
    Returns
    Type Description
    System.Boolean

    True if contents were changed; False otherwise.

    ShouldSerializeHeaderText()

    Determines a value indicting whether the property HeaderText has been modified or not. and its value should be serialized at design-time.

    Declaration
    public bool ShouldSerializeHeaderText()
    Returns
    Type Description
    System.Boolean

    True if contents were changed; False otherwise.

    Events

    PropertyChanged

    Occurs when a property is changed.

    Declaration
    public event DescriptorPropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    DescriptorPropertyChangedEventHandler

    PropertyChanging

    Occurs before a property is changed.

    Declaration
    public event DescriptorPropertyChangedEventHandler PropertyChanging
    Event Type
    Type Description
    DescriptorPropertyChangedEventHandler

    Explicit Interface Implementations

    IGridTableCellAppearanceSource.GetAppearance()

    Declaration
    GridTableCellAppearance IGridTableCellAppearanceSource.GetAppearance()
    Returns
    Type Description
    GridTableCellAppearance

    IGridTableCellAppearanceSource.GetBaseAppearance()

    Declaration
    GridTableCellAppearance IGridTableCellAppearanceSource.GetBaseAppearance()
    Returns
    Type Description
    GridTableCellAppearance

    IGridTableCellAppearanceSource.RaiseAppearanceChanged(GridTableCellStyleInfoChangedEventArgs)

    Declaration
    void IGridTableCellAppearanceSource.RaiseAppearanceChanged(GridTableCellStyleInfoChangedEventArgs e)
    Parameters
    Type Name Description
    GridTableCellStyleInfoChangedEventArgs e

    IGridTableCellAppearanceSource.RaiseAppearanceChanging(GridTableCellStyleInfoChangedEventArgs)

    Declaration
    void IGridTableCellAppearanceSource.RaiseAppearanceChanging(GridTableCellStyleInfoChangedEventArgs e)
    Parameters
    Type Name Description
    GridTableCellStyleInfoChangedEventArgs e

    ICloneable.Clone()

    Declaration
    object ICloneable.Clone()
    Returns
    Type Description
    System.Object

    Implements

    System.ComponentModel.ICustomTypeDescriptor
    System.IDisposable
    System.ICloneable
    IGridTableCellAppearanceSource
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved