# TableCollection.CanAdd Property

> Gets a value indicating whether a new table can be inserted at the current input position. This property does not check for protected TextFields and/or protected document sections. To perform this use in addition the TextControl.CanEdit property.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.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 WPF > Reference > TXTextControl > TableCollection.CanAdd Property
- **580 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecollection/canadd-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecollection/canadd-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecollection/canadd-property/llms-full.txt

---

### Description

Gets a value indicating whether a new table can be inserted at the current input position. This property does not check for protected [TextFields](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfield/llms-full.txt) and/or protected document sections. To perform this use in addition the [TextControl.CanEdit](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/canedit-property/llms-full.txt) property.

### Syntax

```csharp
public bool CanAdd { get; }
```

```vbnet
Public ReadOnly Property CanAdd As Boolean
```

### Examples

The following example works with tables in the current document by using `TableCollection.CanAdd`.

```csharp
TableCollection tableCollection = textControl.Tables;
tableCollection.Add(3, 3, 10);

if (tableCollection.CanAdd)
{
    if (!tableCollection.Add())
    {
        throw new InvalidOperationException("The item could not be inserted.");
    }
}
```

```vbnet
Dim tableCollection As TableCollection = textControl.Tables
tableCollection.Add(3, 3, 10)

If tableCollection.CanAdd Then
    If Not tableCollection.Add() Then
        Throw New InvalidOperationException("The item could not be inserted.")
    End If
End If
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TableCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecollection/add-method/llms-full.txt)
- **Next:** [TableCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecollection/getitem-method/llms-full.txt)
