Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

what is the best and optimised way to load controls dynamically in winforms C#?

$
0
0

I am building a winform Application. I have to create buttons dynamically based on data fetched from database. I followed following steps

  1. Created UserControl
  2. On UserControl_Load event I fetched data from database.
  3. I populated the UserControl with buttons based on number of rows i get from the database.

The above approach proved too slow. The form loads slowly. It takes time to populate buttons. So Which is the best and optimised way to load controls dynamically in C# winforms?


markand


Viewing all articles
Browse latest Browse all 8156

Trending Articles