<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How to cancel a changed item</title><link>https://www.infopathdev.com:443/forums/thread/33793.aspx</link><pubDate>Mon, 03 Nov 2008 13:05:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33793</guid><dc:creator>Francois Larose</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33793.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=33793</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;&amp;nbsp;Thank you.&amp;nbsp; It work fine to control cascading Event.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;But, for my first question, any way to do it?&amp;nbsp; &lt;span style="font-weight:bold;"&gt;During a Validating event or any thing like this, check modification and void any change if it&amp;#39;s not permit ?&lt;/span&gt;&amp;nbsp; I know, I can use a Rule on each single control in one row but it can be pain in the ass to go in this way.&amp;nbsp; My row have more than 10 controls and I have to add a minimum of two Rule on each one... &lt;/p&gt;&lt;p&gt;&amp;nbsp;Good day! &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to cancel a changed item</title><link>https://www.infopathdev.com:443/forums/thread/33690.aspx</link><pubDate>Thu, 30 Oct 2008 16:38:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33690</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33690.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=33690</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The easiest way to prevent this is to set a global flag (variable) which states that your OAC event handler is making DOM changes. Then at the top of your handler, if that flag is set to true, return out and don&amp;#39;t process that event further.&lt;br /&gt;&lt;br /&gt;Then just set the flag to false when done, so that you handler works again later. Here is the code,&amp;nbsp;&lt;/p&gt;&lt;pre&gt;public void SomeField_OnAfterChange(...)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(e.UndoRedo || e.Operation != &amp;quot;Insert&amp;quot; || fIsUpdatingFields == true)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fIsUpdatingFields = true;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Modify DOM here.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fIsUpdatingFields = false;&lt;br /&gt;
}&lt;/pre&gt;
&lt;p&gt;More details on this go through this link,&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/blogs/greg/archive/2004/07/07/Avoid-an-Endless-Loop-During-Event-Bubbling.aspx"&gt;http://www.infopathdev.com/blogs/greg/archive/2004/07/07/Avoid-an-Endless-Loop-During-Event-Bubbling.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: How to cancel a changed item</title><link>https://www.infopathdev.com:443/forums/thread/33689.aspx</link><pubDate>Thu, 30 Oct 2008 16:08:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33689</guid><dc:creator>Francois Larose</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33689.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=33689</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Okay, maybe I have to expose with more detail my goal.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m in a repeating table contexte.&amp;nbsp; Some entry ares read-only and some other can be deleted.&amp;nbsp; When a user try to delete one row in my repeating table, I have to catch Delete event (I can) find my Flag to know if it&amp;#39;s a read only row or not and then, permit to delete or block this XML change...&lt;/p&gt;
&lt;p&gt;At the same time, can we disable Event Handler to control &amp;quot;cascading fire Event&amp;quot; ... I try to make carefull at this but it very hard to do not fire more than one Event at the time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Frank&lt;/p&gt;</description></item><item><title>Re: How to cancel a changed item</title><link>https://www.infopathdev.com:443/forums/thread/33665.aspx</link><pubDate>Thu, 30 Oct 2008 04:21:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33665</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33665.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=33665</wfw:commentRss><description>&lt;p&gt;Hello Welcome to the Forums,&lt;/p&gt;
&lt;p&gt;Undo operation also executes Changed and Validating events. Do you want to stop this operation then you have to include one line code in your solution,&lt;/p&gt;
&lt;p&gt;if(e.IsUndoRedo)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;return;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;This above condition will works for Validating and Changing events but not works for Changed event.&lt;/p&gt;</description></item><item><title>How to cancel a changed item</title><link>https://www.infopathdev.com:443/forums/thread/33663.aspx</link><pubDate>Thu, 30 Oct 2008 02:38:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33663</guid><dc:creator>Francois Larose</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33663.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=33663</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m able to use Changed and Validating event and I know what user try to do by code.&amp;nbsp; I like to know it I can &amp;quot;undo&amp;quot; his change ?!&amp;nbsp; (or not apply, sound better)&amp;nbsp; My post is in my form context; C#, browser enabled on Form server.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thank you,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Frank&lt;/p&gt;</description></item></channel></rss>