I have a table layout panel with something like 150 rows. each row has 6 columns, and in each column I have a text label.
In my program, I want the user to be able during run time to decide which rows he wants to see, so he can select multiple rows, and then say "remove" from table. he can also do "undo" then the rows reapear again.
how I do it? I first create the tlp and labels dynamiclly: the rows height is set to 0 and the labels' visibility is set to false. Then the user chooses rows to see and then I increase the row height and make the labels' visibility to true.
the problem is that I have something like 800 labels, and it take a lot of time for the table to generate it self...
I am sure there is a way fixing this but I have no idea...
thank you!
The solution I have is based on what @IvanStoev wrote at the answer he gave on the previous question.
It not the most elegant solution but it works: I just added a tableName.SuspendLayout();
before start updating the table and tableName.ResumeLayout(true);
when finishing updating it, and it works much much faster.
any comments on this solution would be thankfull.