Class GridModelFloatingCells
Implements the methods to manage floating cell ranges for a grid.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridModelFloatingCells : GridModelBound, IDisposable, ISerializable
Remarks
You access this class from a grid with the FloatingCells property of a GridModel instance.
Covered ranges are saved in two separate collections.
The first collection is GridRangeInfoList, which allows quick enumeration through all covered cell ranges in the grid. This is good when covered ranges need to be recalculated because rows or column have been inserted, moved, or removed.
The second collection is GridCoveredCellPool, which is optimized to look up if a specific cell is part of a covered range.
The QueryCoveredRange event in a GridModel lets you provide customized covered cells ranges at run-time. For example, you might want to have a pattern of covered ranges. This allows you to customize the grid's default behavior and manage covered ranges by your own code and not with the GridModelCoveredRanges class.
Constructors
GridModelFloatingCells(GridModel)
Initializes a new instances ofGridModelFloatingCells class and associates it with a GridModel.
Declaration
public GridModelFloatingCells(GridModel model)
Parameters
Type | Name | Description |
---|---|---|
GridModel | model | A reference to the parent GridModel. |
GridModelFloatingCells(SerializationInfo, StreamingContext)
Initializes a new instances ofGridModelFloatingCells from a serialization stream.
Declaration
protected GridModelFloatingCells(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | An object that holds all the data needed to serialize or de-serialize this instance. |
System.Runtime.Serialization.StreamingContext | context | Describes the source and destination of the serialized stream specified by info. |
Methods
DelayFloatCells(GridRangeInfo)
Marks the specified range of cells to be re-evaluated at a later time if text is floating into neighboring cells.
Declaration
public void DelayFloatCells(GridRangeInfo range)
Parameters
Type | Name | Description |
---|---|---|
GridRangeInfo | range | The range to be re-evaluated. |
Dispose(Boolean)
Disposes the unmanaged resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
EvaluateFloatingCells(GridRangeInfo)
Determines the specified range to see if any cells have been previously marked with DelayFloatCells(GridRangeInfo) to be re-evaluated.
Declaration
public bool EvaluateFloatingCells(GridRangeInfo range)
Parameters
Type | Name | Description |
---|---|---|
GridRangeInfo | range | The range to be re-evaluated. |
Returns
Type | Description |
---|---|
System.Boolean | True if floating state for any cell in the given range was changed. |
Find(Int32, Int32, out GridRangeInfo)
Determines a GridRangeInfo object that indicates the floating cell's range for the specified cell position or False if there is no floating cell's range for the given cell position.
Declaration
public bool Find(int rowIndex, int colIndex, out GridRangeInfo range)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The row index. |
System.Int32 | colIndex | The column index. |
GridRangeInfo | range | The GridRangeInfo where the found floating cell's range is returned. |
Returns
Type | Description |
---|---|
System.Boolean | True if a floating cell's range is at the specified cell position; False if not. |
FindRange(Int32, Int32)
Returns a GridRangeInfo object that indicates the floating cell's range for the specified cell position or Empty if there is no floating cell's range for the given cell position.
Declaration
public GridRangeInfo FindRange(int rowIndex, int colIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The row index. |
System.Int32 | colIndex | The column index. |
Returns
Type | Description |
---|---|
GridRangeInfo | A reference to range if a floating cell's range is at the specified cell position or Empty if not. |
LockEvaluate()
Determines whether temporarily stop evaluating floating cells.
Declaration
public bool LockEvaluate()
Returns
Type | Description |
---|---|
System.Boolean | returns True. |
Merge(GridRangeInfo)
Combines all floating cell's ranges that intersect with a specified into one outer range that spans over all found ranges.
Declaration
public GridRangeInfo Merge(GridRangeInfo range)
Parameters
Type | Name | Description |
---|---|---|
GridRangeInfo | range | The original range. |
Returns
Type | Description |
---|---|
GridRangeInfo | The GridRangeInfo with the outer range. |
UnlockEvaluate()
Start evaluating floating cells again after LockEvaluate call.
Declaration
public void UnlockEvaluate()
Explicit Interface Implementations
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Implements the ISerializable interface and returns the data needed to serialize the GridModelFloatingCells.
Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | A SerializationInfo object containing the information required to serialize the object. |
System.Runtime.Serialization.StreamingContext | context | A StreamingContext object containing the source and destination of the serialized stream. |