Search code examples
c#tablelayoutpanel

Adding a row to a TableLayoutPanel in C# Windows Form


I am currently developing an application in C# using Windows Forms.

I am using a TableLayoutPanel with two columns. How do I add a new row programatically to the table. I have tried doing a google search, but the only problem is I am only finding adding a new row style which doesn't seem right to me.


Solution

  • Nope that's correct. If you want to add a row you need to use RowStyles.Add().

    One easy way of checking this for you self of course is to look at the Form.Designer.cs code.