<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How to read dropdownlist values in infopath form</title><link>https://www.infopathdev.com:443/forums/thread/88321.aspx</link><pubDate>Fri, 22 Mar 2013 23:00:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:88321</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/88321.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=88321</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Not knowing what &amp;quot;node&amp;quot; is in your code makes it hard to help. :-)&lt;/p&gt;&lt;p&gt;Is it the secondary data source that provides the values to your dropdown? If you run the code in debut, how many items are in &amp;quot;child&amp;quot;?&lt;/p&gt;</description></item><item><title>How to read dropdownlist values in infopath form</title><link>https://www.infopathdev.com:443/forums/thread/88303.aspx</link><pubDate>Fri, 22 Mar 2013 14:59:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:88303</guid><dc:creator>smithspd</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/88303.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=88303</wfw:commentRss><description>&lt;p&gt;Hello folks,


I have an InfoPath from which has two dropdownlist controls and a textbox.

I have about 10 values in dropdownlist A and when I enter any field in textbox and hit submit, I should be able to read all the dropdownlist values of A into dropdownlist B along with new value from textbox as a new value.

I&amp;#39;m having issue on how to read the values from dropdownlist A programmatically.

I have tried the following way to read the items in the dropdownlist but it only gets me the first value of the dropdownlist.
&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;XPathNavigator navigator = node.CreateNavigator();
&lt;/p&gt;&lt;p&gt;XPathNodeIterator child =
navigator.SelectChildren(XPathNodeType.Attribute);&lt;/p&gt;&lt;p&gt;

foreach (Object child in
navigator.SelectChildren(XPathNodeType.Attribute))
&lt;/p&gt;&lt;p&gt;{
string str = child.ToString();
&lt;/p&gt;&lt;p&gt;}


&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;--

smith
&lt;/p&gt;</description></item></channel></rss>