<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How to programmatically reset/clear a drop-down list box</title><link>https://www.infopathdev.com:443/forums/thread/72257.aspx</link><pubDate>Tue, 22 Nov 2011 13:21:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:72257</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/72257.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=72257</wfw:commentRss><description>&lt;p&gt;Hi RoseMary,&lt;/p&gt;
&lt;p&gt;Unfortunately, it&amp;#39;s our policy not to write free&amp;nbsp;code for people, because custom code in InfoPath is not a recommended practice, especially for inexperienced coders. I recommend giving qRules a try, but if you want to have a try writing your own code, I can take a look at it for you.&lt;/p&gt;</description></item><item><title>Re: How to programmatically reset/clear a drop-down list box</title><link>https://www.infopathdev.com:443/forums/thread/72255.aspx</link><pubDate>Tue, 22 Nov 2011 11:17:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:72255</guid><dc:creator>RoseMary</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/72255.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=72255</wfw:commentRss><description>can u please provide the piece of code to delete the rows?</description></item><item><title>Re: How to programmatically reset/clear a drop-down list box</title><link>https://www.infopathdev.com:443/forums/thread/72253.aspx</link><pubDate>Tue, 22 Nov 2011 09:53:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:72253</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/72253.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=72253</wfw:commentRss><description>&lt;p&gt;The thread that OP referred to has some pointers for accomplishing what you&amp;#39;re describing.&amp;nbsp; You can also use qRules to do this - just use the Delete command to delete the rows that populate the listbox.&lt;/p&gt;</description></item><item><title>Re: How to programmatically reset/clear a drop-down list box</title><link>https://www.infopathdev.com:443/forums/thread/72247.aspx</link><pubDate>Tue, 22 Nov 2011 05:42:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:72247</guid><dc:creator>RoseMary</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/72247.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=72247</wfw:commentRss><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;How can i delete the values from the list box control and show it as a blank list box control on the click of a button? Please assist!!!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Rosemary&lt;/p&gt;</description></item><item><title>Re: How to programmatically reset/clear a drop-down list box</title><link>https://www.infopathdev.com:443/forums/thread/68342.aspx</link><pubDate>Tue, 12 Jul 2011 18:54:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68342</guid><dc:creator>California_Developer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68342.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=68342</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello again,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thank you :-)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;~W &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to programmatically reset/clear a drop-down list box</title><link>https://www.infopathdev.com:443/forums/thread/68341.aspx</link><pubDate>Tue, 12 Jul 2011 18:47:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68341</guid><dc:creator>California_Developer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68341.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=68341</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Hilary,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It would appear the following lines of code successfully reset my drop-down list box; consequently, you may disregard my last forum post:&lt;/p&gt;&lt;p&gt;XPathNavigator vehicleType = this.MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;//my:myFields/my:CrewRotationPreview/my:CRD_TransportVehicleType&amp;quot;, this.NamespaceManager);&lt;br /&gt;vehicleType.SetValue(String.Empty); &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks for your time :-)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;~W &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to programmatically reset/clear a drop-down list box</title><link>https://www.infopathdev.com:443/forums/thread/68339.aspx</link><pubDate>Tue, 12 Jul 2011 18:44:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68339</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68339.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=68339</wfw:commentRss><description>&lt;p&gt;vehicleType.SetValue&lt;strong&gt;(&amp;quot;&amp;quot;);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Empty double quotes. Or you could use &lt;a href="http://msdn.microsoft.com/en-us/library/system.string.empty.aspx"&gt;String.Empty&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Re: How to programmatically reset/clear a drop-down list box</title><link>https://www.infopathdev.com:443/forums/thread/68338.aspx</link><pubDate>Tue, 12 Jul 2011 18:31:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68338</guid><dc:creator>California_Developer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68338.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=68338</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Hilary,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;No, I do not want to create/clear the options a user can select from the drop down.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;With regards to the suggestion in your first paragraph, how would I set the value to blank? The code I plan to use to programmatically&amp;nbsp; reset the list box control is listed below, but I don&amp;#39;t know how to complete it:&lt;/p&gt;&lt;p&gt;XPathNavigator vehicleType = this.MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;//my:myFields/my:CrewRotationPreview/my:CRD_TransportVehicleType&amp;quot;, this.NamespaceManager);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;vehicleType.SetValue(&amp;lt;What goes here?&amp;gt;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;~W &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to programmatically reset/clear a drop-down list box</title><link>https://www.infopathdev.com:443/forums/thread/68336.aspx</link><pubDate>Tue, 12 Jul 2011 18:14:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68336</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68336.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=68336</wfw:commentRss><description>&lt;p&gt;Generally, the &amp;quot;Select&amp;quot; display is if the value of the field is blank. You don&amp;#39;t need code for this - you can use rules to set the field bound to the drop down control to blank. If you need to do it programatically, create an XPathNavigator for the node, and use SetValue to set the nav&amp;#39;s value to blank.&lt;/p&gt;
&lt;p&gt;The thread you linked to seems to be about creating / clearing the options the user can select from in the dropdown. Is that what you need to instead?&lt;/p&gt;</description></item><item><title>How to programmatically reset/clear a drop-down list box</title><link>https://www.infopathdev.com:443/forums/thread/68335.aspx</link><pubDate>Tue, 12 Jul 2011 18:03:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68335</guid><dc:creator>California_Developer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68335.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=68335</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Forum Community,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;m trying to reset/clear a drop-down list box control using C#. Through some research, I was able to locate a related post (http://www.infopathdev.com/forums/t/19017.aspx), but I&amp;#39;m thinking there has to be a more definitive and best-practices procedure for resetting the control using C# so that it displays the default text (&amp;quot;Select...&amp;quot;) .&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks in advance for your help.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;~W &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>