# TX Text Control Insiders' Tips: Tables

> TX Text Control tables support unlimited nesting, repeating row headers, cell splitting and merging, and colored borders. API techniques cover inserting page breaks via Selection, formatting cells programmatically, cloning rows with Save/Load, and converting tables to plain text.

- **Author:** Bjoern Meyer
- **Published:** 2012-05-24
- **Modified:** 2026-03-05
- **Description:** TX Text Control tables support unlimited nesting, repeating row headers, cell splitting and merging, and colored borders. API techniques cover inserting page breaks via Selection, formatting cells programmatically, cloning rows with Save/Load, and converting tables to plain text.
- **3 min read** (553 words)
- **Tags:**
  - Sample
- **LLMs.txt URL:** https://www.textcontrol.com/blog/2012/05/24/tx-text-control-insiders-tips-tables/llms.txt
- **LLMs-full.txt URL:** https://www.textcontrol.com/blog/2012/05/24/tx-text-control-insiders-tips-tables/llms-full.txt
- **Canonical URL:** https://www.textcontrol.com/blog/2012/05/24/tx-text-control-insiders-tips-tables/

---

![TX Text Control tables](https://s1-www.textcontrol.com/assets/dist/blog/2012/05/24/a/assets/table_ribbon.webp "TX Text Control tables")Using tables in a document can be a powerful tool to structure data, create flexible lists like in reports or to align and format text.

In contrast to other *rich edit controls*, TX Text Control's implementation is feature-complete:

| - Unlimited level nested tables - Unlimited repeating table row headers - Splitting cells (vertical and horizontal) - Merging cells (vertical and horizontal) - Keep content together at page breaks | - Colored table borders and adjustable widths - Cell background color - Store data in a table cell - Powerful table settings dialog - MS Word compatible |
|---|---|

This article is a link and article collection of the most helpful samples and tricks to get most out of this helpful feature.

Inserting a Page Break in the Middle of a Table
-----------------------------------------------

When pressing *CTRL-ENTER* while the input position is in a table, a page break is inserted automatically. To simulate this behaviour programmatically, you need to split the table first in order to insert a page break using the [Selection](https://docs.textcontrol.com/textcontrol/windows-forms/ref.txtextcontrol.selection.class.htm) class:

```
textControl1.Tables.GetItem().Split(TXTextControl.TableAddPosition.After);
textControl1.Selection.Text = "";
```

How to Format Selected Table Cells
----------------------------------

The shipped dialog box can be used to modify the cell formatting of selected table cells. This following article shows how to format selected cells using the API instead of the dialog box:

[Sample code: How to format selected table cells](https://www.textcontrol.com/blog/2012/03/19/sample-code-how-to-format-selected-table-cells/llms-full.txt)

How to Clone a Table Row
------------------------

This article shows how to clone a specific table row without adding a new table row and copying the cell's content. The solution is quite easy. You can simply select the complete table row in order to save the row to memory using [Selection.Save](https://docs.textcontrol.com/textcontrol/windows-forms/ref.txtextcontrol.selection.save.method.htm). On loading it again, the new table row will be added at the current input position. Same results, but much easier. Here is the full article:

[How to clone a table row using TX Text Control .NET for Windows Forms](https://www.textcontrol.com/blog/2010/05/02/how-to-clone-a-table-row-using-tx-text-control-net-for-windows-forms/llms-full.txt)

Converting a Table to Text
--------------------------

Thanks to TX Text Control's easy-to-use Table and TableCell classes, converting a table into normal text is quite easy to solve. The following article shows how to convert every 1-dimensional (not nested) table to normal text.

[TX Text Control .NET for Windows Forms: Converting a table to text](https://www.textcontrol.com/blog/2009/07/10/tx-text-control-net-for-windows-forms-converting-a-table-to-text/llms-full.txt)

Bound Tables: A Class to Fill and Format Tables Easily
------------------------------------------------------

TX Text Control offers a very powerful set of features to insert and manipulate tables. Every table cell can be formatted using the TableCell class. This sample introduces a class that can be created with a DataTable in it's constructor. The table adapts the structure of the table automatically and populates it's rows with the content from a database.

[Bound tables: A class to fill and format tables easily](https://github.com/TextControl/)

If you are looking for different samples or if you are having additional requirements, feel free to request a [sample application](https://www.textcontrol.com/support/).

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [Create a Table of Contents in Windows Forms using C#](https://www.textcontrol.com/blog/2023/01/23/create-toc-in-windows-forms/llms.txt)
- [Official TX Text Control .NET Sample Applications Are Now Hosted on GitHub](https://www.textcontrol.com/blog/2023/01/08/official-tx-text-control-net-sample-applications-are-now-hosted-on-github/llms.txt)
- [Detect Toggle Button Changes Using a MutationObserver](https://www.textcontrol.com/blog/2021/11/11/detect-toggle-button-changes-using-a-mutationobserver/llms.txt)
- [Two Ways to Restart Numbered Lists in TX Text Control](https://www.textcontrol.com/blog/2021/11/03/two-ways-to-restart-numbered-lists/llms.txt)
- [Zoom Tricks: Disabling CTRL + MOUSE WHEEL and More](https://www.textcontrol.com/blog/2020/12/09/zoom-tricks-disabling-ctrl-mouse-wheel-and-more/llms.txt)
- [AutoCorrect Using TX Text Control and TX Spell .NET](https://www.textcontrol.com/blog/2017/08/17/autocorrect-using-tx-text-control-and-tx-spell-net/llms.txt)
- [Creating Conference Badges with Text Control Reporting](https://www.textcontrol.com/blog/2017/02/14/creating-conference-badges-with-text-control-reporting/llms.txt)
- [Using Custom Document Properties to Store Additional Document Information](https://www.textcontrol.com/blog/2017/02/09/using-custom-document-properties-to-store-additional-document-information/llms.txt)
- [Use SubTextParts to Protect Document Parts](https://www.textcontrol.com/blog/2015/12/29/use-subtextparts-to-protect-document-parts/llms.txt)
- [Reporting: Styling the DocumentViewer for ASP.NET](https://www.textcontrol.com/blog/2015/06/14/reporting-styling-the-documentviewer-for-aspnet/llms.txt)
- [Reporting: Merging MS Word Documents with DocVariables](https://www.textcontrol.com/blog/2015/06/10/reporting-merging-ms-word-documents-with-docvariables/llms.txt)
- [TextControl.Web: Determine when a Document Has Been Completely Loaded](https://www.textcontrol.com/blog/2015/06/09/textcontrolweb-determine-when-a-document-has-been-completely-loaded/llms.txt)
- [TextControl.Web: Adding Custom Ribbon Tabs](https://www.textcontrol.com/blog/2015/05/29/textcontrolweb-adding-custom-ribbon-tabs/llms.txt)
- [Building a Touch-enabled Button Bar with Javascript](https://www.textcontrol.com/blog/2015/05/27/building-a-touch-enabled-button-bar-with-javascript/llms.txt)
- [TextControl.Web: Inserting Merge Fields Using Javascript](https://www.textcontrol.com/blog/2015/05/16/textcontrolweb-inserting-merge-fields-using-javascript/llms.txt)
- [MailMerge: Merge Hyperlinks into Merge Fields](https://www.textcontrol.com/blog/2015/05/15/mailmerge-merge-hyperlinks-into-merge-fields/llms.txt)
- [Mail Merge: Suppress Lines with Empty Merge Fields](https://www.textcontrol.com/blog/2014/08/01/mail-merge-suppress-lines-with-empty-merge-fields/llms.txt)
- [Interactive Spelling Suggestions Using TX Spell .NET](https://www.textcontrol.com/blog/2014/07/30/interactive-spelling-suggestions-using-tx-spell-net/llms.txt)
- [Alternate Row Colors Using NEXT Fields](https://www.textcontrol.com/blog/2013/12/30/alternate-row-colors-using-next-fields/llms.txt)
- [Loading Dictionaries Dynamically in TX Spell .NET](https://www.textcontrol.com/blog/2013/12/20/loading-dictionaries-dynamically-in-tx-spell-net/llms.txt)
- [Restart the Page Numbering Fields Per Section](https://www.textcontrol.com/blog/2013/11/08/restart-the-page-numbering-fields-per-section/llms.txt)
- [TX Barcode .NET: Test the Barcode Engine Live!](https://www.textcontrol.com/blog/2013/07/10/tx-barcode-net-test-the-barcode-engine-live/llms.txt)
- [SD Times .NET Component Buyers Guide 2013: Simplify Report Creation](https://www.textcontrol.com/blog/2013/06/06/sd-times-net-component-buyers-guide-2013-simplify-report-creation/llms.txt)
- [Inserting MS Word Compatible Page Number Fields](https://www.textcontrol.com/blog/2013/05/30/inserting-ms-word-compatible-page-number-fields/llms.txt)
- [MailMerge: Creating Shipping Labels Using TX Text Control](https://www.textcontrol.com/blog/2012/11/23/mailmerge-creating-shipping-labels-using-tx-text-control/llms.txt)
