Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / IRangeGroupSupport Interface / AddRangeGroup Method
Start index
Number of rows or columns to group
Whether the outline (range group) is of rows
Example


In This Topic
    AddRangeGroup Method (IRangeGroupSupport)
    In This Topic
    Groups a range of rows or columns into an outline from a specified start index by a specified amount.
    Syntax
    'Declaration
     
    Sub AddRangeGroup( _
       ByVal startIndex As Integer, _
       ByVal count As Integer, _
       ByVal isRowGroup As Boolean _
    ) 
    'Usage
     
    Dim instance As IRangeGroupSupport
    Dim startIndex As Integer
    Dim count As Integer
    Dim isRowGroup As Boolean
     
    instance.AddRangeGroup(startIndex, count, isRowGroup)
    void AddRangeGroup( 
       int startIndex,
       int count,
       bool isRowGroup
    )

    Parameters

    startIndex
    Start index
    count
    Number of rows or columns to group
    isRowGroup
    Whether the outline (range group) is of rows
    Example
    This example adds a group to the range.
    fpSpread1.ActiveSheet.AddRangeGroup(0, 20, true);
    fpSpread1.ActiveSheet.AddRangeGroup(0, 10, true);
    fpSpread1.ActiveSheet.RangeGroupBackGroundColor = Color.Yellow;
    fpSpread1.ActiveSheet.RangeGroupButtonStyle = FarPoint.Win.Spread.RangeGroupButtonStyle.Enhanced;
    
    FarPoint.Win.Spread.IRangeGroupSupport rangeGroupSupport = (FarPoint.Win.Spread.IRangeGroupSupport)fpSpread1.ActiveSheet;
    if (rangeGroupSupport == null)
    {
    return;
    }
    rangeGroupSupport.AddRangeGroup(0, 4, true);
    
    FpSpread1.ActiveSheet.AddRangeGroup(0, 20, True)
    FpSpread1.ActiveSheet.AddRangeGroup(0, 10, True)
    FpSpread1.ActiveSheet.RangeGroupBackGroundColor = Color.Yellow
    FpSpread1.ActiveSheet.RangeGroupButtonStyle = FarPoint.Win.Spread.RangeGroupButtonStyle.Enhanced
    
    Dim rangeGroupSupport As FarPoint.Win.Spread.IRangeGroupSupport = CType(FpSpread1.ActiveSheet, FarPoint.Win.Spread.IRangeGroupSupport)
    If rangeGroupSupport Is Nothing Then
       Return
    End If
    rangeGroupSupport.AddRangeGroup(0, 4, True)
    
    See Also