Hi Fellas, Can anyone help me by telling how to reduce the time of adding rows and colums to tablelayoutpanel dynamically? As I need to add 10 rows and 10 columns (maximum 10x 10 =100 controls, may be less than 100 depending upon user input ),I have construct the logic which works good but the bad of my logic is Its taken considerable time in adding rows and columsn to tablelayoutpanel.
Plz guide
Regards Asad
for (int rowNumber = 1; rowNumber <= (TSegments.Value); rowNumber++)
{
for (int columnNumber = 1; columnNumber < (PSegments.Value) * 2 + 2; columnNumber++)
{
tempTextBox = new TextBox();
tableLayoutPanel1.Controls.Add(tempTextBox, columnNumber, rowNumber);
tempTextBox.Anchor = System.Windows.Forms.AnchorStyles.Right;
tempTextBox.Dock = DockStyle.Fill;
}
}