ComponentOne FlexPivot for WinForms
C1.Win.FlexPivot.4.5.2 Assembly / C1.Win.FlexPivot Namespace / C1FlexPivotGrid Class / GetMergedRange Method / GetMergedRange(Int32,Int32,Boolean) Method
Row index.
Column index.
Whether the range should be clipped to the visible area of the grid.

In This Topic
    GetMergedRange(Int32,Int32,Boolean) Method
    In This Topic
    Returns the merged range of cells that includes a given cell.
    Syntax
    'Declaration
     
    Public Overloads Overridable Function GetMergedRange( _
       ByVal row As Integer, _
       ByVal col As Integer, _
       ByVal clip As Boolean _
    ) As CellRange
    public virtual CellRange GetMergedRange( 
       int row,
       int col,
       bool clip
    )

    Parameters

    row
    Row index.
    col
    Column index.
    clip
    Whether the range should be clipped to the visible area of the grid.

    Return Value

    A C1.Win.C1FlexGrid.CellRange object that contains the given cell.
    Remarks

    Cell merging is controlled by the C1.Win.C1FlexGrid.C1FlexGrid.AllowMerging property. The C1.Win.C1FlexGrid.C1FlexGrid.GetMergedRange method allows you to determine whether a cell is merged with adjacent cells.

    You can override the C1.Win.C1FlexGrid.C1FlexGrid.GetMergedRange method to implement custom merging logic. If you do this, make sure the merging method is consistent and efficient, since it gets called frequently and affects the grid's appearance and behavior.

    Example
    The code below checks the current cell after a selection to see if it is part of a merged range: The code below shows how you can override the C1.Win.C1FlexGrid.C1FlexGrid.GetMergedRange method to provide custom merging:
    See Also