<?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: Disable, clear or delete History (undo &amp; redo)</title><link>https://www.infopathdev.com:443/forums/thread/99629.aspx</link><pubDate>Thu, 16 Oct 2014 18:04:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:99629</guid><dc:creator>Upender Singh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/99629.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=99629</wfw:commentRss><description>&lt;p&gt;Hello David,&lt;/p&gt;
&lt;p&gt;I am new to infopath and&amp;nbsp;coding.&lt;/p&gt;
&lt;p&gt;I designed the form on which I want to disable undo so no changes can be made.&lt;/p&gt;
&lt;p&gt;I have tried the above code but it not blocked the undo or redo once you tab out.&lt;/p&gt;
&lt;p&gt;Could you please help as how to block the undo once the feild is tab out.&lt;/p&gt;
&lt;p&gt;Thanks for your support in advance.&lt;/p&gt;
&lt;p&gt;Regards, &lt;/p&gt;
&lt;p&gt;Upender Singh&lt;/p&gt;</description></item><item><title>Re: Disable, clear or delete History (undo &amp; redo)</title><link>https://www.infopathdev.com:443/forums/thread/27106.aspx</link><pubDate>Mon, 10 Mar 2008 13:07:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:27106</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/27106.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=27106</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi David,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;Thanks for this trick this is very interesting. I will try to do like this and&lt;br /&gt;me and my user thanks you a lot.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;++&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Thierry&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Disable, clear or delete History (undo &amp; redo)</title><link>https://www.infopathdev.com:443/forums/thread/26987.aspx</link><pubDate>Tue, 04 Mar 2008 17:38:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26987</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26987.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26987</wfw:commentRss><description>&lt;p&gt;Root node is good enough - with this code in place hitting undo/redo will have no effect (unless you have not tabbed out yet, this cannot be disabled). Also you can do it conditionally based on some logic you may have (like a checkbox saying &amp;quot;disable undo/redo&amp;quot;).&lt;/p&gt;</description></item><item><title>Re: Disable, clear or delete History (undo &amp; redo)</title><link>https://www.infopathdev.com:443/forums/thread/26986.aspx</link><pubDate>Tue, 04 Mar 2008 17:32:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26986</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26986.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26986</wfw:commentRss><description>&lt;p&gt;Thanks for the further ideas, David! So when you say &amp;quot;block&amp;quot; do you mean that once this is hit, it effectively prevents access to the undo stack at that point? If so, and you want to completely disable undo, would you need to add this code for every node in the form, or could you do it once at the root node (on account of event bubble up)?&lt;/p&gt;</description></item><item><title>Re: Disable, clear or delete History (undo &amp; redo)</title><link>https://www.infopathdev.com:443/forums/thread/26980.aspx</link><pubDate>Tue, 04 Mar 2008 17:07:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26980</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26980.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26980</wfw:commentRss><description>&lt;p&gt;Well, as far as disabling undo/redo, you can do some things programmatically. The OnBeforeChange event (IP2007 OM, equivalents exist in IP2003 as well) is cancellable and has the IsUndoRedo flag.&lt;/p&gt;
&lt;p&gt;You can check this flag and do things when it&amp;#39;s true. For example, this will effectively disable Undo/Redo:&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; myFields_OnBeforeChange(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;DataDOMEvent&lt;/font&gt;&lt;font size="2"&gt; e)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (e.IsUndoRedo)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp; e.ReturnStatus = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Note that this will not disable undo within the textbox because no event is fired until you tab out. This undo cannot be ever disabled. However, once you tab out, Undo will be blocked with the code above.&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Disable, clear or delete History (undo &amp; redo)</title><link>https://www.infopathdev.com:443/forums/thread/26969.aspx</link><pubDate>Tue, 04 Mar 2008 08:03:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26969</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26969.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26969</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Greg,&lt;/p&gt;&lt;p&gt;&amp;nbsp;Ok thanks for your answer.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;Thierry&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Disable, clear or delete History (undo &amp; redo)</title><link>https://www.infopathdev.com:443/forums/thread/26947.aspx</link><pubDate>Mon, 03 Mar 2008 19:08:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26947</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26947.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26947</wfw:commentRss><description>&lt;p&gt;Undo history is cleared when a view is changed. There is not partial clearing of undo history.&lt;/p&gt;</description></item><item><title>Disable, clear or delete History (undo &amp; redo)</title><link>https://www.infopathdev.com:443/forums/thread/26935.aspx</link><pubDate>Mon, 03 Mar 2008 15:58:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26935</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26935.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=26935</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;One of my community user&amp;nbsp;ask me this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Is it possible for a formular to desactivate (code or not) totallly undo or redo?&lt;/p&gt;
&lt;p&gt;Is it possible on a button click to clear all the history?&lt;/p&gt;
&lt;p&gt;Is it possible to delete partially this history? to keep only the ten or twenty last action?&amp;nbsp;Is it possible to set&amp;nbsp;a maximum of&amp;nbsp;ten undo as default? &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Have you any information about that?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks&lt;/p&gt;
&lt;p&gt;Thierry&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>