# Copying Size and Style of Row/Column on Insert

Spread allows you to the copy the size and style of previous row/column on inserting a new row/column.

## Content



Spread allows you to copy width, height and style settings from a previous row/column whenever a new row/column is inserted in existing rows/columns. This feature works only when **LegacyBehaviors.Style** is excluded from [LegacyBehaviors](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.LegacyBehaviors.html) enum.

Copying of style and size settings applies only when a new row/column is inserted by following methods:

*   Using **context menu** in **Spread Designer**
*   Using **Insert** dropdown in Home Tab of ribbon bar
*   Using **context menu** at runtime
*   Using **Excel Compatible Shortcut Keys** (Ctrl Shift +)

The following images illustrates that the inserted row has copied the size and style settings from previous row.

| ![](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/inserting%20a%20row2.png) |   ![](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/copying_style_size.png)   |
| --- | --- |

To insert new rows/columns using context menu at runtime, use the following code.

```csharp
// Context menu appears at runtime
fpSpread1.ContextMenuStrip = new SpreadContextMenuStrip();
```

```vbnet
' Context menu appears at runtime
FpSpread1.ContextMenuStrip = New SpreadContextMenuStrip()
```

For inserting new rows/columns using keyboard shortcut keys (Ctrl Shift +), you have to enable the ExcelCompatibleKeyboardShortcuts option. To do this, use the following code.

```csharp
// Excel compatible shortcut keys will be enabled at runtime
fpSpread1.Features.ExcelCompatibleKeyboardShortcuts = true;
```

```vbnet
' Excel compatible shortcut keys will be enabled at runtime
FpSpread1.Features.ExcelCompatibleKeyboardShortcuts = True
```


> !type=note
>
> This feature does not affect inserting rows/columns using the [InsertRows](/spreadnet/api/latest/online-win/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.IWorksheet.InsertRows.html) and the [InsertColumns](/spreadnet/api/latest/online-win/GrapeCity.Spreadsheet/GrapeCity.Spreadsheet.IWorksheet.InsertColumns.html) methods at runtime.

## See Also

[Customizing Row or Column Interaction](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interact-rowcol)

[Managing Sorting of Rows of User Data](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interact-rowcol/spwin-sorting)

[Managing Filtering of Rows of User Data](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interact-rowcol/spwin-filtering)

[Managing Grouping of Rows of User Data](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interact-rowcol/spwin-grouping)

[Managing Outlines (Range Groups) of Rows and Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interact-rowcol/spwin-outline)

[Customizing User Searching of Data](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interact-rowcol/spwin-datasearch)