Hi all,
i need a 26 rows by 8 colums check boxes table.
i get the number of rows from a data base so i prefere to create the check boxes at run time.
the thing is it takes something like 10 seconds on my powerful computer to draw them all.
is there a better way to do it ?
the code :
while (row_num2<26)
{
for (int chk_cntr = 0; chk_cntr < 8; chk_cntr++)
{
chkBox2[chk_cntr + 8 * row_num2] = new CheckBox();
chkBox2[chk_cntr + 8 * row_num2].Name = "2_" + (chk_cntr + 8 * row_num2).ToString();
tableLayout2.Controls.Add(chkBox2[chk_cntr + 8 * row_num2], chk_cntr + 2, row_num2 + 1);
}
row_num2++;
}