<?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: Remove DropDown Item Based on an (Existing Change Event and the Dropdowns Selected Value at the time)</title><link>https://www.infopathdev.com:443/forums/thread/43504.aspx</link><pubDate>Fri, 26 Jun 2009 13:27:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43504</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43504.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=43504</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do one thing, add two drop down list boxes. One includes the value (which you want to remove from the drop down) and the other does not include this value. So conditionally hide one control and show the another control.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Remove DropDown Item Based on an (Existing Change Event and the Dropdowns Selected Value at the time)</title><link>https://www.infopathdev.com:443/forums/thread/43472.aspx</link><pubDate>Thu, 25 Jun 2009 15:25:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43472</guid><dc:creator>e_stylzz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43472.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=43472</wfw:commentRss><description>&lt;p&gt;I basically have two versions of the form (look the same just about) that is controlled by a dropdown.&amp;nbsp; The values are New (default) and Extension.&amp;nbsp; When the user opens an existing form, and changes the value to Extension, others things happen and are already in place, such has changing text box values to old text box values and moving old end dates, to new start dates, etc.&lt;/p&gt;&lt;p&gt;What I would like to do is with a dropdownlist called ddlPO.&amp;nbsp; If the original value was not = &amp;quot;NA&amp;quot;, then I want &amp;quot;NA&amp;quot; removed from the dropdown list.&amp;nbsp; I&amp;#39;m kinda used to working with VB in .NET apps, but this is all in C# out of my comfort zone.&lt;/p&gt;&lt;p&gt;I tried this:&amp;nbsp; ( it errors because these properties like Items and Selected value don&amp;#39;t exist in this fashion)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;if &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:ddlPO&amp;quot;).SelectedValue != &amp;quot;NA&amp;quot;;&lt;br /&gt;then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisXDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:ddlPO&amp;quot;).Items.RemoveAt(thisXDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:ddlPO&amp;quot;).Items.IndexOf(thisXDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:ddlPO&amp;quot;).Items.FindByValue(&amp;quot;NA&amp;quot;))); &lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>