<?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: Disabling an onchange event</title><link>https://www.infopathdev.com:443/forums/thread/95300.aspx</link><pubDate>Fri, 17 Jan 2014 17:10:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95300</guid><dc:creator>renatois</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95300.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=95300</wfw:commentRss><description>Hi Jimmy, when I open a form it also loads the method of the DropDown change (public void drpChantier_Changed(object sender, XmlEventArgs e)). Can you give me a hand on&amp;nbsp;avoiding that? thanks</description></item><item><title>Re: Disabling an onchange event</title><link>https://www.infopathdev.com:443/forums/thread/55390.aspx</link><pubDate>Thu, 27 May 2010 18:43:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55390</guid><dc:creator>jcarson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55390.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55390</wfw:commentRss><description>&lt;p&gt;Thanks Jimmy.&amp;nbsp; That&amp;#39;s what I decided to do and it works just fine.&lt;/p&gt;</description></item><item><title>Re: Disabling an onchange event</title><link>https://www.infopathdev.com:443/forums/thread/55383.aspx</link><pubDate>Thu, 27 May 2010 17:09:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55383</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55383.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55383</wfw:commentRss><description>&lt;p&gt;There isn&amp;#39;t a way to turn an OnChange event off and on dynamically.&amp;nbsp; You can, however, add logic to the event that inspects the form&amp;#39;s XML and only runs the relevant code only under a certain condition.&lt;/p&gt;</description></item><item><title>Disabling an onchange event</title><link>https://www.infopathdev.com:443/forums/thread/55376.aspx</link><pubDate>Thu, 27 May 2010 16:06:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55376</guid><dc:creator>jcarson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55376.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55376</wfw:commentRss><description>&lt;p&gt;Is it possible to disable the code I&amp;#39;ve written for an onchange event and then re-enable it?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve got a browser based form that populates a repeating table with a set of questions. The user can then select an answer from a list (Yes, No, N/A).&amp;nbsp;&amp;nbsp;Yes is the default answer.&amp;nbsp; I then write the answers with the corresponding questions to a sharepoint list.&amp;nbsp; I&amp;#39;d like to only write back the answers that have changed.&amp;nbsp;&amp;nbsp;Below is my code for determining if a change has been made.&amp;nbsp; However, it is always triggered when I write the questions to my table.&amp;nbsp; Is there a way to make it so that the Changed Event is inactive until all of the questions have been loaded the first time?&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; gpSection2_2E_1_Changed(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XmlEventArgs&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// Get a reference to the form&amp;#39;s XmlNamespaceManager object.&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XmlNamespaceManager&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; ns = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// See if values have been changed.&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (e.Operation == &lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XmlOperation&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.ValueChange)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;e.Site.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:Updated2.1&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, ns).SetValue(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;true&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>