<?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: Add data to a list box from a dropdown</title><link>https://www.infopathdev.com:443/forums/thread/54602.aspx</link><pubDate>Thu, 06 May 2010 14:27:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54602</guid><dc:creator>martinpalmer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54602.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54602</wfw:commentRss><description>&lt;p&gt;ok, so what I have done is put the dropdown in a repeating table that I can parse through.&amp;nbsp; Is there a way to add a button to a column in the repeating table that will delete the&amp;nbsp;associated&amp;nbsp;row?&lt;/p&gt;</description></item><item><title>Re: Add data to a list box from a dropdown</title><link>https://www.infopathdev.com:443/forums/thread/54573.aspx</link><pubDate>Thu, 06 May 2010 06:18:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54573</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54573.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54573</wfw:commentRss><description>&lt;p&gt;you cant just go and add items to dropdown or listbox at run time like we do in .net. &lt;/p&gt;
&lt;p&gt;we have to bind the listbox to a repeating table and when u want to insert one more item to the listbox insert it into the repeating table and it will reflect in the list box since it is bound.&lt;/p&gt;</description></item><item><title>Add data to a list box from a dropdown</title><link>https://www.infopathdev.com:443/forums/thread/54566.aspx</link><pubDate>Wed, 05 May 2010 22:36:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54566</guid><dc:creator>martinpalmer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54566.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54566</wfw:commentRss><description>&lt;p&gt;I have a listbox (listBox) and a dropdown list(dropDown).&amp;nbsp; I want to be able to select an item from the dropDown and add them to the listBox.&amp;nbsp; I have looked everywhere for this but all I ever see is adding data from a datasource instead of a dropdown.&amp;nbsp; I want this to be dynamic so the listBox is populated based on the a user selected in the dropDown.&amp;nbsp; The code I have is:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Sub btnGo_OnClick(eventObj)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dim field1 as XPathNavigator = xDocument.DOM.selectNodes(&amp;quot;//my:listbox&amp;quot;)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dim newNode as XPathNavigator = field1.Clone()&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set objXMLNodes = XDocument.DOM.selectNodes(&amp;quot;//my:myFields&amp;quot;)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mytext = XDocument.DOM.selectSingleNode(&amp;quot;//my:dropDown&amp;quot;).text&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = msgbox(mytext, vbok)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39;so I can see, yes I am getting data from the dropdown to add to the listbox&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newNode.SelectSingleNode(&amp;quot;value&amp;quot;).SetValue(mytext)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newNode.SelectSingleNode(&amp;quot;displayname&amp;quot;).SetValue(mytext)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field1.appendchild(newNode) &lt;br /&gt;&lt;br /&gt;End Sub&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>