# TextControl.TableCreated Event

> Occurs after a new table has been created as a result of a text insertion via the clipboard or when loading a document which contains a table without an identifier. It does not occur when the table is inserted with the TableInsert method or for tables that have a previously set identifier when loading a document. The event handler receives an argument of type TableEventArgs containing data related to this event.

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

---

### Description

Occurs after a new table has been created as a result of a text insertion via the clipboard or when loading a document which contains a table without an identifier. It does not occur when the table is inserted with the TableInsert method or for tables that have a previously set identifier when loading a document. The event handler receives an argument of type [TableEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableeventargs/llms-full.txt) containing data related to this event.

### Syntax

```csharp
public event TableEventHandler TableCreated;
```

```vbnet
Public Event TableCreated As TableEventHandler
```

### Examples

The following example records useful context when table created occurs.

```csharp
textControl.TableCreated += (sender, e) =>
{
    Console.WriteLine($"Table Created at {DateTime.Now:u}");
};
```

```vbnet
AddHandler textControl.TableCreated,
    Sub(sender, e)
        Console.WriteLine($"Table Created at {DateTime.Now:u}")
    End Sub
```

### Remarks

The TableCreated event is always fired, if a table is inserted from the clipboard and is not next to another table. If the table has an identifier, it will be kept. If a previously existent table has the same identifier, the identifier will point to the already present table.

The TableCreated event is not fired, if a table is inserted from the clipboard next to another table. The table will be merged with the existent table and the resulting table inherits the identifier from the already existent one.

---

## Nearby

- **Previous:** [TextControl.TabDialog Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/tabdialog-method/llms-full.txt)
- **Next:** [TextControl.TableDeleted Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/tabledeleted-event/llms-full.txt)
