menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridStyleInfoIdentity - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridStyleInfoIdentity

    Identity is the reference back to the cell the style belongs to.

    Inheritance
    System.Object
    StyleInfoIdentityBase
    GridStyleInfoIdentity
    GridTableCellStyleInfoIdentity
    Implements
    System.IDisposable
    IGridModelSource
    Inherited Members
    StyleInfoIdentityBase.GetBaseStyleNotEmptyExpandable(IStyleInfo, StyleInfoProperty)
    StyleInfoIdentityBase.InnerIdentity
    StyleInfoIdentityBase.IsDisposable
    StyleInfoIdentityBase.OnStyleChanging(StyleInfoBase, StyleInfoProperty)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridStyleInfoIdentity : StyleInfoIdentityBase, IDisposable, IGridModelSource
    Remarks

    GridStyleInfo will ask for base styles through GridStyleInfoIdentity.GetBaseStyles when the user accesses a property that is not initialized in the style. GridStyleInfoIdentity also ensures that changes are made permanent in GridData.

    Constructors

    GridStyleInfoIdentity(GridStyleInfoIdentity)

    Initializes a new instance ofGridStyleInfoIdentity and copies its data from an existing object.

    Declaration
    protected GridStyleInfoIdentity(GridStyleInfoIdentity other)
    Parameters
    Type Name Description
    GridStyleInfoIdentity other

    The existing object to copy data from.

    GridStyleInfoIdentity(IGridData, GridCellPos)

    Initializes a new instance ofGridStyleInfoIdentity with a reference to IGridData, row and column index, and offline state.

    Declaration
    public GridStyleInfoIdentity(IGridData data, GridCellPos pos)
    Parameters
    Type Name Description
    IGridData data

    A reference to IGridData.

    GridCellPos pos

    Cell coordinates.

    GridStyleInfoIdentity(IGridData, GridCellPos, Boolean)

    Initializes a new instance ofGridStyleInfoIdentity with a reference to IGridData, row and column index, and offline state.

    Declaration
    public GridStyleInfoIdentity(IGridData data, GridCellPos pos, bool offLine)
    Parameters
    Type Name Description
    IGridData data

    A reference to IGridData.

    GridCellPos pos

    Cell coordinates.

    System.Boolean offLine

    True if changes in this style object should not be stored in the associated IGridData.

    GridStyleInfoIdentity(IGridData, Int32, Int32)

    Initializes a new instance ofGridStyleInfoIdentity with a reference to IGridData, row, and column index.

    Declaration
    public GridStyleInfoIdentity(IGridData data, int rowIndex, int colIndex)
    Parameters
    Type Name Description
    IGridData data

    A reference to IGridData.

    System.Int32 rowIndex

    Row index.

    System.Int32 colIndex

    Column index.

    GridStyleInfoIdentity(IGridData, Int32, Int32, Boolean)

    Initializes a new instance ofGridStyleInfoIdentity with a reference to IGridData, row and column index, and offline state.

    Declaration
    public GridStyleInfoIdentity(IGridData data, int rowIndex, int colIndex, bool offLine)
    Parameters
    Type Name Description
    IGridData data

    A reference to IGridData

    System.Int32 rowIndex

    Row index.

    System.Int32 colIndex

    Column index.

    System.Boolean offLine

    True if changes in this style object should not be stored in the associated IGridData.

    Properties

    CellPos

    Gets or sets the cell coordinates.

    Declaration
    public GridCellPos CellPos { get; set; }
    Property Value
    Type
    GridCellPos

    ColIndex

    Gets the column index.

    Declaration
    public int ColIndex { get; }
    Property Value
    Type
    System.Int32

    Data

    Gets to IGridData.

    Declaration
    public IGridData Data { get; }
    Property Value
    Type
    IGridData

    Info

    Gets results of ToString method.

    Declaration
    public virtual string Info { get; }
    Property Value
    Type
    System.String

    OffLine

    Gets a value indicating whether changes in the style object should stored. True if changes in this style object should not be stored in the associated IGridData.

    Declaration
    public virtual bool OffLine { get; }
    Property Value
    Type
    System.Boolean

    RowIndex

    Gets the row index.

    Declaration
    public int RowIndex { get; }
    Property Value
    Type
    System.Int32

    Methods

    Dispose()

    Releases all resources used by the GridStyleInfoIdentity.

    Declaration
    public override void Dispose()
    Overrides
    StyleInfoIdentityBase.Dispose()

    Finalize()

    Finalizes an instance of the GridStyleInfoIdentity class. Removes the associated cell cache object from the volatile data store.

    Declaration
    protected void Finalize()

    GetActiveGridView()

    Returns the active GridControlBase for the GridModel this style belongs to or NULL if the style is used outside a grid model.

    Declaration
    public virtual GridControlBase GetActiveGridView()
    Returns
    Type Description
    GridControlBase

    A reference to the grid control base or NULL if the style is used outside a grid model.

    GetBaseStyle(IStyleInfo, StyleInfoProperty)

    Overridden to return the style that has the specific property initialized.

    Declaration
    public override StyleInfoBase GetBaseStyle(IStyleInfo thisStyleInfo, StyleInfoProperty sip)
    Parameters
    Type Name Description
    IStyleInfo thisStyleInfo

    The style information.

    StyleInfoProperty sip

    Identifier for the property to operate on.

    Returns
    Type Description
    StyleInfoBase

    A Syncfusion.Styles.StyleInfoBase that has the property initialized.

    Overrides
    StyleInfoIdentityBase.GetBaseStyle(IStyleInfo, StyleInfoProperty)

    GetBaseStyles(IStyleInfo)

    Overridden to return base styles from IGridData by calling GetBaseStyles(GridStyleInfo, Int32, Int32).

    Declaration
    public override IStyleInfo[] GetBaseStyles(IStyleInfo thisStyleInfo)
    Parameters
    Type Name Description
    IStyleInfo thisStyleInfo

    A reference to a IStyleInfo.

    Returns
    Type Description
    IStyleInfo[]

    An array of base styles.

    Overrides
    StyleInfoIdentityBase.GetBaseStyles(IStyleInfo)

    GetGridModel()

    Returns the GridModel this style belongs to or NULL if the style is used outside a grid model.

    Declaration
    public virtual GridModel GetGridModel()
    Returns
    Type Description
    GridModel

    A reference to the grid model or NULL if the style is used outside a grid model.

    LookupCellModel(String)

    Returns a GridCellModelBase for the specified id / cell type name.

    Declaration
    public virtual GridCellModelBase LookupCellModel(string id)
    Parameters
    Type Name Description
    System.String id

    Cell type name.

    Returns
    Type Description
    GridCellModelBase

    The GridCellModelBase for the given id.

    Remarks

    Calls LookupCellModel(String).

    MakeOfflineIdentity()

    Creates a new GridStyleInfoIdentity and copies its identity information from the current object. The new instance will be detached from IGridData so that changes in this style object are not be stored in the associated IGridData.

    Declaration
    public GridStyleInfoIdentity MakeOfflineIdentity()
    Returns
    Type Description
    GridStyleInfoIdentity

    A new GridStyleInfoIdentity instance.

    Remarks

    Lets a style object load base styles and default values but disables saving changes back to the grid. (see OnStyleChanged below)

    OnStyleChanged(StyleInfoBase, StyleInfoProperty)

    Overridden. If the style is not offline, saves its changes in the IGridData.

    Declaration
    public override void OnStyleChanged(StyleInfoBase style, StyleInfoProperty sip)
    Parameters
    Type Name Description
    StyleInfoBase style

    A reference to the GridStyleInfo object.

    StyleInfoProperty sip

    The StyleInfoProperty that identifies the changed style property.

    Overrides
    StyleInfoIdentityBase.OnStyleChanged(StyleInfoBase, StyleInfoProperty)

    ToString()

    Returns a string that represents the current object.

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

    A string that represents the current object.

    Overrides
    System.Object.ToString()

    Explicit Interface Implementations

    IGridModelSource.Model

    Gets a reference to a GridModel.

    Declaration
    GridModel IGridModelSource.Model { get; }
    Returns
    Type
    GridModel

    Implements

    System.IDisposable
    IGridModelSource
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved