# Using an Outline (Range Group) of Rows or Columns

Learn how to create and manage outlines in Spread.NET using various methods such as AddRangeGroup for the SheetView class.

## Content

You can form outlines of one or more rows or columns. There are several methods that create an outline (range group) such as the [AddRangeGroup](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.AddRangeGroup.html) method for the [SheetView](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.html) class.
The outline appears at the left (for rows) and top (for columns) of the spreadsheet beyond the headers. Outlines can be nested, creating levels of outlines. The numbered boxes that appear in the outline area allow you to expand or collapse all the outlines of that level. You can expand and collapse rows and columns by clicking on the expand and collapse icons or on the numbered outline headers.
The figure below shows three levels of outline for rows and columns, and shows the terminology of the parts of the outline area.
![Outline Parts](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/outline-parts.png)

## Using Code

1. Set the [InterfaceRenderer](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.InterfaceRenderer.html) property to change the default style.
2. Set the [RangeGroupBackgroundColor](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.RangeGroupBackgroundColor.html) property to specify the outline background.
3. Set the [RangeGroupButtonStyle](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.RangeGroupButtonStyle.html) property to specify the button style.
4. Use [AddRangeGroup](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.AddRangeGroup.html) to add outlines.

## Example

This example creates two column outline groups.

```csharp
fpSpread1.ActiveSheet.Rows.Count = 11;
fpSpread1.ActiveSheet.Columns.Count = 6;
fpSpread1.InterfaceRenderer = null;
fpSpread1.ActiveSheet.RangeGroupBackgroundColor = Color.LightGreen;
fpSpread1.ActiveSheet.RangeGroupButtonStyle = FarPoint.Win.Spread.RangeGroupButtonStyle.Enhanced;
fpSpread1.ActiveSheet.AddRangeGroup(0, 8, true);
fpSpread1.ActiveSheet.AddRangeGroup(0, 5, true);
fpSpread1.ActiveSheet.AddRangeGroup(1, 3, false);
fpSpread1.ActiveSheet.AddRangeGroup(1, 2, false);
```

```vbnet
fpSpread1.ActiveSheet.Rows.Count = 11
fpSpread1.ActiveSheet.Columns.Count = 6
fpSpread1.InterfaceRenderer = Nothing
fpSpread1.ActiveSheet.RangeGroupBackgroundColor = Color.LightGreen
fpSpread1.ActiveSheet.RangeGroupButtonStyle = FarPoint.Win.Spread.RangeGroupButtonStyle.Enhanced
fpSpread1.ActiveSheet.AddRangeGroup(0, 8, True)
fpSpread1.ActiveSheet.AddRangeGroup(0, 5, True)
fpSpread1.ActiveSheet.AddRangeGroup(1, 3, False)
fpSpread1.ActiveSheet.AddRangeGroup(1, 2, False)
```

You can hide the outline area by using the [ShowOutline](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.ShowOutline.html) property of the [FpSpread](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.html) class. It accepts [RowCol](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.RowCol.html) enumeration values as Both (Default), Rows, Columns or None.
The following example shows the rows outline and hides the columns outline.
![](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/hideoutline.png)

```csharp
fpSpread1.ActiveSheet.AddRangeGroup(0, 8, true);
fpSpread1.ActiveSheet.AddRangeGroup(1, 3, false);
// Show only rows outline
fpSpread1.ShowOutline = FarPoint.Win.Spread.RowCol.Rows;
```

```vbnet
fpSpread1.ActiveSheet.AddRangeGroup(0, 8, true)
fpSpread1.ActiveSheet.AddRangeGroup(1, 3, false)
'Show only rows outline
fpSpread1.ShowOutline = FarPoint.Win.Spread.RowCol.Rows
```

## See Also

[Customizing the Appearance of an Outline (Range Group)](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interact-rowcol/spwin-outline/spwin-outline-customize)
[Interoperability of Outlines with Other Features](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interact-rowcol/spwin-outline/spwin-outline-interop)