Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create dynamic controls from a CSV file?

Status
Not open for further replies.

markdmac

MIS
Dec 20, 2003
12,340
US
I created an application that has a number of phases, tasks, days for each task and a check box for each task. Based on what check boxes are selected my application creates a word document by combining some templates. This is all working for me perfectly, but the labels for the phases & tasks are static. After showing my coworkers the application they would like to be able to provide a configuration file (CSV or XML I don't care) to be able to dynamically build out the labels and controls.

Each heading can have multiple tasks associated with it, so I am guessing an XML file would be easiest to use from the perspective of the source file, however I am totally in the dark how to even begin.

I need my form to populate like this:

Phase Task Days Include in Document

Phase & Task are labels, Days is a NumericUpDown and Include in Document is a check box.

I need to be able to reference the NumericUpDown and checkboxes by name such as NumUpDown1 and Checkbox1

Can anyone point me to any reference material that might demo how to do this? Or perhaps share some basic code to do it?

Thank you in advance.
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top