A control array or class?

I am developing a rather large Windows app for my company. Part of the functionality of this app is pretty detailed. I have a design that is very feasible and user-friendly, however, I'm not sure what the best approach is to building it in the code-behind.

Here is the scenario.

A groupbox of one of more checkboxes are dynamically generated based on an Item  Number being entered. Potentially, there could be up to 12 checkboxes which represent "Channels" (electronic load sensor device contains one or more channels). Based on how many channels there are, I have a tab control that will contain a tab for each channel, hence, possibly 12 tabs. On each tab there are 77 various controls, i.e. Labels, TextBoxes, ComboBoxes, DataGridViews, GroupBoxes, etc.

What I'm deliberating on is whether to create a UserControl that contains each of the 40-50 controls and then for each "Channel" Tab that is generated, dynamically insert this UC onto the tab. This is what I'm thinking. I'm not sure if there is a better way to do this even though there is generally more than one way of accomplishing a task.

Any ideas?

Performance is a major issue here also.

Thanks!
BlakeMcKennaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
What I'm deliberating on is whether to create a UserControl that contains each of the 40-50 controls and then for each "Channel" Tab that is generated, dynamically insert this UC onto the tab.

There should be no deliberation here.  Yes, that should definitely be a UserControl.  Otherwise you'll end up with a ton of code to generate, wire up and layout said controls, which sounds like a code maintenance  nightmare to me...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BlakeMcKennaAuthor Commented:
A code maintenance nightmare indeed. I'll be looping and adding Event Handlers based on the number of "Channels".
CodeCruiserCommented:
Do you have to create separate tabs duplicating the same controls for all channels? Or can you get away with having one set of controls and a combobox at the top. When user selects a channel from the combobox, controls refresh to present the state for that channel. When user makes changes and clicks save, control state is saved for the selected channel.
BlakeMcKennaAuthor Commented:
I've thought of this approach as well...
BlakeMcKennaAuthor Commented:
Thanks Mike!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.