Class GridVolatileData
Implements the 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
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridVolatileData : IGridVolatileData, IGridData, IDisposable
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
GridVolatileData(GridModel)
Attaches the object to the GridModel.
Declaration
public GridVolatileData(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 the cached column styles within GridVolatileData
Declaration
public GridVolatileData.ColStylesIndexer ColStyles { get; }
Property Value
Type |
---|
GridVolatileData.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[Int32, Int32]
Gets or sets GridStyleInfo at a given row and column index.
Declaration
public GridStyleInfo this[int rowIndex, int colIndex] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | |
System.Int32 | colIndex |
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 the cached row styles within GridVolatileData.
Declaration
public GridVolatileData.RowStylesIndexer RowStyles { get; }
Property Value
Type |
---|
GridVolatileData.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 virtual void Clear()
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 that consists 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 | The name of the base style. |
System.Int32 | level | The maximum number of levels to look at when walking reference base styles. |
Returns
Type | Description |
---|---|
GridStyleInfo[] | An array that consists 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. |