Can I programmatically change a dropdown data connection

T

Tim Philomeno

I want to be able to swith from using a webservice data connection to using
an XML Document for secondary data...Is there a way to programmatically
change the "Data Connection" property of a drop down list in managed code?

Thanks!

Tim Philomeno, Sparling, Inc.
 
G

Greg Collins [InfoPath MVP]

I don't know of any way to switch it dynamically... but you do something like:

Set up a secondary data source with a repeating list in it.
Bind your drop-down list to that data source.
Get your values from whatever you want (Web service, XML file, etc) and then clear and repopulate the secondary data source.

Your drop-down binds to a single source, but you dynamically popualte that source from whereever you want.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


I want to be able to swith from using a webservice data connection to using
an XML Document for secondary data...Is there a way to programmatically
change the "Data Connection" property of a drop down list in managed code?

Thanks!

Tim Philomeno, Sparling, Inc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top