---
title: "TableLayoutPanel Control in C#.Net"  
description: "The TableLayoutPanel control is a container of other control where child controls are added within a table structure. When you add a control to a cell"  
author: "Pushpendra Singh"  
published: 2011-01-24  
updated: 2020-09-07  
canonical: https://www.mindstick.com/articles/404/tablelayoutpanel-control-in-c-sharp-dot-net  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# TableLayoutPanel Control in C#.Net

The TableLayoutPanel [control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) is a [container](https://www.mindstick.com/forum/34127/extjs-how-to-set-border-for-the-container) of other control where child [controls](https://www.mindstick.com/articles/66/how-to-create-controls-at-run-time-in-csharp-dot-net) are added within a [table structure](https://answers.mindstick.com/qa/113649/what-is-the-database-table-structure-of-url-analyzer-details-to-store). When you add a control to a cell of the table, it would reposition itself to the center of the cell.\

##### How to use TableLayoutPanel Control

[Drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) TableLayoutPanel from toolbox on the [window Form](https://www.mindstick.com/forum/527/how-to-pass-datagridview-s-cells-value-to-another-window-form).

![TableLayoutPanel Control in C#.Net](https://www.mindstick.com/mindstickarticle/319666b5-26f5-4367-be6a-8269017e604f/images/a14dfd4c-73b7-4568-a8a1-62d7cad4ad88.png)

We can add more row and column from collection property of TableLayoutPanel.

We can add other controls in TableLayoutPanel.

![TableLayoutPanel Control in C#.Net](https://www.mindstick.com/mindstickarticle/319666b5-26f5-4367-be6a-8269017e604f/images/e346cb98-23c3-44c4-9ceb-4c149b6235a9.png)

TableLayoutPanel can have only one control in each cell.

Here we cannot add more than one control in a cell. If you want to add more control then you have to add new cell in TableLayoutPanel to do this first you have to add row or [column](https://www.mindstick.com/forum/2288/column-site_name-ambiguous-problem) in the TableLayoutPanel.

##### TableLayoutPanel properties

CellBorderStyle: This [property](https://www.mindstick.com/articles/198559/an-ownership-of-property-in-hua-hin) determines if the cell is outlined with a border or not.

ColumnCount: Determines the number of columns in the table.

RowCount: Determines the number of rows in the table.

Visible: This property determines that TableLayoutPanel control is visible or not. By [default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources) it is true.

##### Example:

```
private void frmTableLayoutPanel_Load(object sender, EventArgs e){         //Hide TableLayoutPanel         tableLayoutPanel1.Visible = false;}
```

TableLayoutPanel will not visible when [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) run.

![TableLayoutPanel Control in C#.Net](https://www.mindstick.com/mindstickarticle/319666b5-26f5-4367-be6a-8269017e604f/images/302223f8-f2cc-4afd-bf53-f296785648e7.png)

---

Original Source: https://www.mindstick.com/articles/404/tablelayoutpanel-control-in-c-sharp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
