# TableRowCollection.CanAdd Property

> Gets a value indicating whether a new row 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 > TableRowCollection.CanAdd Property
- **698 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablerowcollection/canadd-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablerowcollection/canadd-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablerowcollection/canadd-property/llms-full.txt

---

### Description

Gets a value indicating whether a new row 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 creates a small report table and works with its structure by using `TableRowCollection.CanAdd`.

```csharp
textControl.Tables.Add(3, 3, 10);
Table table = textControl.Tables.GetItem(10);
TableRowCollection tableRowCollection = table.Rows;

if (tableRowCollection.CanAdd)
{
    if (!tableRowCollection.Add(TableAddPosition.After, 1))
    {
        throw new InvalidOperationException("The item could not be inserted.");
    }
}
```

```vbnet
textControl.Tables.Add(3, 3, 10)
Dim table As Table = textControl.Tables.GetItem(10)
Dim tableRowCollection As TableRowCollection = table.Rows

If tableRowCollection.CanAdd Then
    If Not tableRowCollection.Add(TableAddPosition.After, 1) Then
        Throw New InvalidOperationException("The item could not be inserted.")
    End If
End If
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TableRowCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablerowcollection/add-method/llms-full.txt)
- **Next:** [TableRowCollection.CanRemove Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablerowcollection/canremove-property/llms-full.txt)
