<?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: Error while hiding a section control</title><link>https://www.infopathdev.com:443/forums/thread/29270.aspx</link><pubDate>Tue, 10 Jun 2008 13:39:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29270</guid><dc:creator>mehtavipulk</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29270.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=29270</wfw:commentRss><description>&lt;p&gt;&lt;strong&gt;CTRL82&lt;/strong&gt; is the ViewContext name (if you right click the Optional section control -&amp;gt; Advanced tab)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OptionalEULAGroup&lt;/strong&gt; is the name of the field / group name&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;group1_154 &lt;/strong&gt;is the value of XmlToEdit For XOptional field (if you right click the Optional section control -&amp;gt; Advanced tab)&lt;/p&gt;</description></item><item><title>Re: Error while hiding a section control</title><link>https://www.infopathdev.com:443/forums/thread/29233.aspx</link><pubDate>Mon, 09 Jun 2008 08:56:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29233</guid><dc:creator>InfoPathN00b</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29233.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=29233</wfw:commentRss><description>&lt;p&gt;Can you tell us a little about the parameters you use in your code?&lt;br /&gt;&lt;br /&gt;XPathNavigator node = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/my:myFields/my:OptionalEULAGroup&amp;quot;, NamespaceManager);&lt;br /&gt;CurrentView.SelectNodes(node, node, &amp;quot;CTRL82&amp;quot;);&lt;br /&gt;CurrentView.ExecuteAction(ActionType.XOptionalRemove, &amp;quot;group1_154&amp;quot;);&lt;br /&gt;&lt;br /&gt;According to http://msdn.microsoft.com/en-us/library/aa945763.aspx&lt;br /&gt;The first two parameters of your SelectNodes method should be a start and end node, yours are both the same. Is this correct? Also, what is CTRL82? Is it the same as OptionalEULAGroup?&lt;br /&gt;&lt;br /&gt;On your last line what is the contents of group1_154?&lt;br /&gt;http://msdn.microsoft.com/en-us/library/aa944286.aspx&lt;br /&gt;http://msdn.microsoft.com/en-us/library/microsoft.office.infopath.actiontype.aspx&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;gt;BTW Can I only use Optional Section control for such a requirement?&lt;/p&gt;&lt;p&gt;This is the only way I know of.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Error while hiding a section control</title><link>https://www.infopathdev.com:443/forums/thread/29224.aspx</link><pubDate>Fri, 06 Jun 2008 14:24:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29224</guid><dc:creator>mehtavipulk</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29224.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=29224</wfw:commentRss><description>&lt;p&gt;I use below code&lt;/p&gt;
&lt;p&gt;XPathNavigator node = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/my:myFields/my:OptionalEULAGroup&amp;quot;, NamespaceManager);&lt;br /&gt;CurrentView.SelectNodes(node, node, &amp;quot;CTRL82&amp;quot;);&lt;br /&gt;CurrentView.ExecuteAction(ActionType.XOptionalRemove, &amp;quot;group1_154&amp;quot;);&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;My requirement is to hide this section on&amp;nbsp;Edit mode of the form &amp;amp; display it on insert mode. So in that case I do not use the rules &amp;amp; conditions&lt;/p&gt;
&lt;p&gt;BTW Can I only use Optional Section control for such a requirement?&lt;/p&gt;</description></item><item><title>Re: Error while hiding a section control</title><link>https://www.infopathdev.com:443/forums/thread/29223.aspx</link><pubDate>Fri, 06 Jun 2008 14:04:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29223</guid><dc:creator>InfoPathN00b</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29223.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=29223</wfw:commentRss><description>&lt;p&gt;What code are you using to hide it? What happens around line 199? Have you tried hiding it using conditional formatting and rules i.e. not through code?&amp;nbsp;&lt;/p&gt;</description></item><item><title>Error while hiding a section control</title><link>https://www.infopathdev.com:443/forums/thread/29222.aspx</link><pubDate>Fri, 06 Jun 2008 12:41:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29222</guid><dc:creator>mehtavipulk</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29222.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=29222</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have an section control on my page &amp;amp; I need hide id based on some condition. I have implemented below code for hiding section control&lt;/p&gt;
&lt;p&gt;&amp;nbsp;CurrentView.ExecuteAction(ActionType.XOptionalRemove, &amp;quot;EULA&amp;quot;);&lt;/p&gt;
&lt;p&gt;But while executing that I get the followign error. The fieldname of the section is &amp;quot;EULA&amp;quot;&lt;/p&gt;
&lt;p&gt;System.NotImplementedException: The method or operation is not implemented. &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.ViewHost.ExecuteAction(ActionType action, String xmlToEdit) &lt;br /&gt;at ExternalAccountForm.FormCode.FormEvents_Loading(Object sender, LoadingEventArgs e) in D:\Inetpub\WWWROOT\InfoPath\Forms\ExternalUser\FormCode.cs:line 199 &lt;br /&gt;at Microsoft.Office.InfoPath.Server.SolutionLifetime.FormEventsHost.&amp;lt;&amp;gt;c__DisplayClass6.&amp;lt;&amp;gt;c__DisplayClassa.&amp;lt;add_Loading&amp;gt;b__3() &lt;br /&gt;at Microsoft.Office.InfoPath.Server.Util.DocumentReliability.InvokeBusinessLogic(Thunk thunk) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.SolutionLifetime.FormEventsHost.&amp;lt;&amp;gt;c__DisplayClass6.&amp;lt;add_Loading&amp;gt;b__2(Object sender, LoadingEventArgs e) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.SolutionLifetime.FormEventsHost.&amp;lt;&amp;gt;c__DisplayClass34.&amp;lt;FireLoadingEvent&amp;gt;b__30() &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.CallFormCodeWithExceptionHandling(UserMessages userMessages, OMCall d)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;An entry has been added to the Windows event log of the server. &lt;br /&gt;Log ID:5337 &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;What might be the issue?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Regards,&lt;/p&gt;
&lt;p&gt;Vipul Mehta&lt;/p&gt;</description></item></channel></rss>