I believe that what you want to do it populate a list of available channels programmatically. I assumed that you are using Visual Studio 2005 with a NI-DAQmx device. If this is not the case then please reply with the specific programming environment and language as well as the hardware you are using.
For an example of how to populate a drop down list please look at the examples located here: C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Analog In\Measure Voltage\AcqVoltageSamples_ExtClk\cs
Any of these examples should have a Channels box that will demonstrate what you want to see.
Any of these examples should have a Channels box that will demonstrate what you want to see.If you right click on the Channel drop down box and select "view code" you should see the following line:
This line of code basically populates this list from the Measurement and Automation Explorer so all available channels should show up. This will allow you to choose the channels you want from a list of available channels so if you remove a device those channels won’t show up.
I hope this helps get you started. If you have any further questions or if I misinterpreted your question then please respond back and clarify what it is you’d like to know.
Have a good night!