# Table.Cells Property

> Gets a collection of all table cells the table consists of. The property's value is an object of the type TableCellCollection.

- **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 > Table.Cells Property
- **497 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/table/cells-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/table/cells-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/table/cells-property/llms-full.txt

---

### Description

Gets a collection of all table cells the table consists of. The property's value is an object of the type [TableCellCollection](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecellcollection/llms-full.txt).

### Syntax

```csharp
public TableCellCollection Cells { get; }
```

```vbnet
Public ReadOnly Property Cells As TableCellCollection
```

### Examples

The following example fills every cell with a label derived from its row and column numbers.

```csharp
textControl.Tables.Add(2, 2, 10);
Table table = textControl.Tables.GetItem(10);

foreach (TableCell cell in table.Cells)
{
    cell.Text = $"Row {cell.Row}, column {cell.Column}";
}
```

```vbnet
textControl.Tables.Add(2, 2, 10)
Dim table As Table = textControl.Tables.GetItem(10)

For Each cell As TableCell In table.Cells
    cell.Text = $"Row {cell.Row}, column {cell.Column}"
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [Table.CanSplitCells Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/table/cansplitcells-property/llms-full.txt)
- **Next:** [Table.Columns Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/table/columns-property/llms-full.txt)
