<?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: Drop down list code</title><link>https://www.infopathdev.com:443/forums/thread/79262.aspx</link><pubDate>Wed, 06 Jun 2012 06:39:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79262</guid><dc:creator>Crazy-Ninja</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79262.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=79262</wfw:commentRss><description>Not sure what I&amp;#39;m doing wrong... Here is how I edited the code to skip the rest of the subroutine if group2NodesCount is 0</description></item><item><title>Re: Drop down list code</title><link>https://www.infopathdev.com:443/forums/thread/79136.aspx</link><pubDate>Fri, 01 Jun 2012 11:28:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79136</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79136.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=79136</wfw:commentRss><description>That looks like it should work, except that it will cause a NullReferenceException if there are no items in the list yet.&amp;nbsp; Try using an If statement to skip the rest of the subroutine if group2NodesCount is 0.</description></item><item><title>Re: Drop down list code</title><link>https://www.infopathdev.com:443/forums/thread/79132.aspx</link><pubDate>Fri, 01 Jun 2012 06:10:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79132</guid><dc:creator>Crazy-Ninja</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79132.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=79132</wfw:commentRss><description>here it is...</description></item><item><title>Re: Drop down list code</title><link>https://www.infopathdev.com:443/forums/thread/79101.aspx</link><pubDate>Thu, 31 May 2012 14:59:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79101</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79101.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=79101</wfw:commentRss><description>What does the delete code look like?</description></item><item><title>Re: Drop down list code</title><link>https://www.infopathdev.com:443/forums/thread/79093.aspx</link><pubDate>Thu, 31 May 2012 14:12:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79093</guid><dc:creator>Crazy-Ninja</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79093.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=79093</wfw:commentRss><description>Ok next problem with the same dropdownlists... when a user makes a selection in the drop down list, it populates the next drop down list... OK that all works correctly now... the problem comes in when a user goes back to the original drop down list and selects something else, I need the repeating group to drop all of its values and load a new set, because the previous values still come up... I tried to delete the values, but i just ended up with an object null exception....  Any Ideas?</description></item><item><title>Re: Drop down list code</title><link>https://www.infopathdev.com:443/forums/thread/79082.aspx</link><pubDate>Thu, 31 May 2012 11:10:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79082</guid><dc:creator>Crazy-Ninja</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79082.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=79082</wfw:commentRss><description>thanks, it was a changing event rather than a changed event</description></item><item><title>Re: Drop down list code</title><link>https://www.infopathdev.com:443/forums/thread/79081.aspx</link><pubDate>Thu, 31 May 2012 10:51:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79081</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79081.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=79081</wfw:commentRss><description>Are you sure you put that in the Changed event, and not the Changing event?&amp;nbsp; I would expect trying to modify the data source during a Changing event to produce an error like that.</description></item><item><title>Re: Drop down list code</title><link>https://www.infopathdev.com:443/forums/thread/79080.aspx</link><pubDate>Thu, 31 May 2012 09:35:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79080</guid><dc:creator>Crazy-Ninja</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79080.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=79080</wfw:commentRss><description>OK for the first drop down list, the code runs perfectly when the form loads.
from the selection of this drop down list I want to populate the next drop down list.
So all I did was copy and paste the exact same code into the changed event.

I have attached my code


the 5th line of code &amp;quot;nav.SelectSingleNode(&amp;quot;/my:myFields/my:SectionA/my:names&amp;quot;, NamespaceManager).SetValue(&amp;quot;&amp;quot;)&amp;quot; gives me the following error:
Operation is not valid, because of the current state of the object.

Any Idea what is wrong?</description></item><item><title>Re: Drop down list code</title><link>https://www.infopathdev.com:443/forums/thread/78902.aspx</link><pubDate>Thu, 24 May 2012 10:05:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78902</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78902.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=78902</wfw:commentRss><description>You will need to set the dropdown to populate from a repeating group in either the main or a secondary source.&amp;nbsp; Then you can use code to manipulate the XML items in that repeating group.</description></item><item><title>Drop down list code</title><link>https://www.infopathdev.com:443/forums/thread/78899.aspx</link><pubDate>Thu, 24 May 2012 08:18:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78899</guid><dc:creator>Crazy-Ninja</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78899.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=78899</wfw:commentRss><description>How would I go about populating a drop down list using vb.net code. Is there anything special I would need to do in order to access and add new values in the drop down list.</description></item></channel></rss>