menu

WinForms

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

    Show / Hide Table of Contents

    Class GridNewVolatileData

    Implements the functionalities that provides GridStyleInfo objects on demand that are returned by the grid model's indexer. GridVolatileData caches the objects and their identity information holding a weak reference to them.

    Inheritance
    System.Object
    GridNewVolatileData
    Implements
    IGridVolatileData
    IGridData
    System.IDisposable
    IGridVisibleCellLists
    Inherited Members
    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)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridNewVolatileData : IGridVolatileData, IGridData, IDisposable, IGridVisibleCellLists
    Remarks

    GridModel holds a GridData object. This object contains the plain data with style settings specific to a cell. When GridVolatileData creates a style object, it asks the grid to return the cell settings from GridData and then associate these settings with identity information. This allows access to style properties using inheritance from base styles. Identity information also ensures that changes to the style object will be written back correctly to GridData.

    Constructors

    GridNewVolatileData(GridModel)

    Initializes the new instance of the GridNewVolatileData class.

    Declaration
    public GridNewVolatileData(GridModel grid)
    Parameters
    Type Name Description
    GridModel grid

    The parent grid model that will access style information through this object.

    Properties

    BaseStylesMap

    Gets the base styles map.

    Declaration
    public GridBaseStylesMap BaseStylesMap { get; }
    Property Value
    Type
    GridBaseStylesMap

    ColCount

    Gets or sets a cached value for column count.

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

    ColStyles

    Gets cached column styles within GridVolatileData

    Declaration
    public GridNewVolatileData.ColStylesIndexer ColStyles { get; }
    Property Value
    Type
    GridNewVolatileData.ColStylesIndexer

    Grid

    Gets a reference to the parent grid model.

    Declaration
    public GridModel Grid { get; }
    Property Value
    Type
    GridModel

    HasColCount

    Gets a value indicating whether a value for column count has been cached.

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

    HasRowCount

    Gets a value indicating whether a value for row count has been cached.

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

    Item[GridCellPos]

    Gets or sets the grid style info got particular cell position

    Declaration
    public GridStyleInfo this[GridCellPos cell] { get; set; }
    Parameters
    Type Name Description
    GridCellPos cell

    Grid Cell

    Property Value
    Type
    GridStyleInfo

    Item[Int32, Int32]

    Gets or sets the GridStyleInfo at a given row and column index.

    Declaration
    public GridStyleInfo this[int rowIndex, int columnIndex] { get; set; }
    Parameters
    Type Name Description
    System.Int32 rowIndex
    System.Int32 columnIndex
    Property Value
    Type
    GridStyleInfo

    RowCount

    Gets or sets a cached value for row count.

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

    RowStyles

    Gets cached row styles within GridVolatileData.

    Declaration
    public GridNewVolatileData.RowStylesIndexer RowStyles { get; }
    Property Value
    Type
    GridNewVolatileData.RowStylesIndexer

    TableStyle

    Gets or sets access to a GridStyleInfo for the table style.

    Declaration
    public GridStyleInfo TableStyle { get; set; }
    Property Value
    Type
    GridStyleInfo

    Methods

    Clear()

    Empty the cache.

    Declaration
    public void Clear()

    Clear(GridCellPos)

    Resets cache for a specific cell.

    Declaration
    public void Clear(GridCellPos cell)
    Parameters
    Type Name Description
    GridCellPos cell

    The cell coordinates.

    Dispose()

    Disposes the object and collection items.

    Declaration
    public void Dispose()

    GetBaseStyles(GridStyleInfo, Int32, Int32)

    Gets an array that consists of table, row, and column base styles for the specified row and column index.

    Declaration
    public GridStyleInfo[] GetBaseStyles(GridStyleInfo thisStyleInfo, int rowIndex, int colIndex)
    Parameters
    Type Name Description
    GridStyleInfo thisStyleInfo

    Cell style information.

    System.Int32 rowIndex

    Row index.

    System.Int32 colIndex

    Column index.

    Returns
    Type Description
    GridStyleInfo[]

    An array of table, row and column base styles.

    GetBaseStylesMapStyles(String, out Int32)

    Gets an array that consists of table, row, and column base styles for the specified row and column index.

    Declaration
    public GridStyleInfo[] GetBaseStylesMapStyles(string name, out int level)
    Parameters
    Type Name Description
    System.String name

    Name of the base style.

    System.Int32 level

    The maximum number of levels to look at when walking referenced base styles.

    Returns
    Type Description
    GridStyleInfo[]

    An array of table, row and column base styles.

    GetItem(GridCellPos)

    Gets the cached style information for a specific cell.

    Declaration
    public GridStyleInfo GetItem(GridCellPos cell)
    Parameters
    Type Name Description
    GridCellPos cell

    The cell coordinate.

    Returns
    Type Description
    GridStyleInfo

    The cached GridStyleInfo; NULL if no cache entry was found.

    LookupCellModel(String)

    Looks up a GridCellModelBase for a given cell type as specified with CellType.

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

    Cell type name.

    Returns
    Type Description
    GridCellModelBase

    Cell model.

    ResetColCount()

    Clears cached value for column count.

    Declaration
    public void ResetColCount()

    ResetItem(GridCellPos)

    Resets cache for a specific cell.

    Declaration
    public void ResetItem(GridCellPos cell)
    Parameters
    Type Name Description
    GridCellPos cell

    The cell coordinates.

    ResetRowCount()

    Clears cached value for row count.

    Declaration
    public void ResetRowCount()

    SetItem(GridCellPos, GridStyleInfo)

    Saves style information to be cached.

    Declaration
    public void SetItem(GridCellPos cell, GridStyleInfo style)
    Parameters
    Type Name Description
    GridCellPos cell

    The cell coordinate.

    GridStyleInfo style

    The GridStyleInfo to be cached.

    SetVisibleColumnsList(Object, IDictionary)

    Saves column style information.

    Declaration
    public void SetVisibleColumnsList(object view, IDictionary list)
    Parameters
    Type Name Description
    System.Object view

    Column identity information.

    System.Collections.IDictionary list

    The column style settings to be saved.

    SetVisibleRowsList(Object, IDictionary)

    Saves row style information.

    Declaration
    public void SetVisibleRowsList(object view, IDictionary list)
    Parameters
    Type Name Description
    System.Object view

    Row identity information.

    System.Collections.IDictionary list

    The row style settings to be saved.

    Implements

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