# Table.Split Method

> Splits a table below or above the current input position. If the table does not contain the current input position it cannot be split. The Table.CanSplit property can be used to determine if a table can be split or not. If a table is split above the first row a new line is inserted above the table and if a table is split below the last row a new line is inserted below the table. This is useful to insert text above or below a nested table that immediately starts and/or ends at the beginning or the end of the cell in which it is nested.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 11.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > Table.Split Method
- **747 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/table/split-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/table/split-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/table/split-method/llms-full.txt

---

### Description

Splits a table below or above the current input position. If the table does not contain the current input position it cannot be split. The [Table.CanSplit](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/table/cansplit-property/llms-full.txt) property can be used to determine if a table can be split or not. If a table is split above the first row a new line is inserted above the table and if a table is split below the last row a new line is inserted below the table. This is useful to insert text above or below a nested table that immediately starts and/or ends at the beginning or the end of the cell in which it is nested.

### Syntax

```csharp
public bool Split(TableAddPosition position);
```

```vbnet
Public Function Split(position As TableAddPosition) As Boolean
```

### Parameters

| Parameter | Description |
|---|---|
| position | Specifies the position where to split the table. It can be one of the [TableAddPosition](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableaddposition/enumeration/llms-full.txt) values:  \| Value \| Meaning \| \| Before \| The table is split in front of the row with the current input position. \| \| After \| The table is split behind the row with the current input position. \| |
|---|

### Return Value

The return value is true, if the table could be split. Otherwise it is false.

### Examples

The following example splits a table after its second row.

```csharp
textControl.Tables.Add(4, 3, 10);
Table table = textControl.Tables.GetItem(10);
textControl.InputPosition =
    new InputPosition(table.Cells.GetItem(2, 1).Start);

table.Split(TableAddPosition.After);
```

```vbnet
textControl.Tables.Add(4, 3, 10)
Dim table As Table = textControl.Tables.GetItem(10)
textControl.InputPosition =
    New InputPosition(table.Cells.GetItem(2, 1).Start)

table.Split(TableAddPosition.After)
```

---

## Nearby

- **Previous:** [Table.Select Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/table/select-method/llms-full.txt)
- **Next:** [Table.SplitCells Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/table/splitcells-method/llms-full.txt)
