<?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: Restricting user form deleting node in repeating section but not adding</title><link>https://www.infopathdev.com:443/forums/thread/37388.aspx</link><pubDate>Tue, 20 Jan 2009 14:53:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37388</guid><dc:creator>guptasourav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37388.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=37388</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Swathip,&lt;/p&gt;&lt;p&gt;This is not working for me.&amp;nbsp; The changing event only works when you have client form.This does not comes with browser. I have already posted that in the XMLEvent class there are only 2 events Changed and Validating and there is no changing event. Therefore when I manually add event handler it gives me this error : &lt;i&gt;&amp;quot;add the type or namespace &amp;quot;XmlChangingEventArgs&amp;quot; could not be found&amp;quot;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;The XMLEvent class shows the following : &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;using System;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;namespace Microsoft.Office.InfoPath&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public abstract class XmlEvent&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected XmlEvent();&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public abstract bool RaiseUndoRedoForChanged { get; set; }&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public abstract event 
XmlChangedEventHandler Changed;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public abstract event XmlValidatingEventHandler 
Validating;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Restricting user form deleting node in repeating section but not adding</title><link>https://www.infopathdev.com:443/forums/thread/37375.aspx</link><pubDate>Tue, 20 Jan 2009 09:19:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37375</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37375.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=37375</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can directly add the changing event for a field. Follow the below steps.&lt;/p&gt;
&lt;p&gt;1. In your code you will see InternalStartup() method. In this method write the following.&lt;/p&gt;
&lt;p&gt;EventManager.XmlEvents[&amp;quot;xpath of your repeating node&amp;quot;].Changing += new XmlChangingEventHandler(repeatingfieldname_Changing);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ex: EventManager.XmlEvents[&amp;quot;/my:myFields/my:group3/my:group4&amp;quot;].Changing += new XmlChangingEventHandler(group4_Changing);&lt;/p&gt;
&lt;p&gt;2. After adding the above, add the changing event method.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;public void repeatingfieldname _Changing(object sender, XmlChangingEventArgs e)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Write your code&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ex: &lt;/p&gt;
&lt;p&gt;public void group4_Changing(object sender, XmlChangingEventArgs e)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Write your code here&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;</description></item><item><title>Re: Restricting user form deleting node in repeating section but not adding</title><link>https://www.infopathdev.com:443/forums/thread/37342.aspx</link><pubDate>Mon, 19 Jan 2009 16:36:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37342</guid><dc:creator>guptasourav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37342.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=37342</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Shiva,&lt;/p&gt;&lt;p&gt;Does events depend upon Browser and Client forms. I can see changing event as you said but it is disabled. Do you know some way to make that enable.&lt;/p&gt;&lt;p&gt;I have this class when i go to definition on changed event. Do you get the same thing.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;using System;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;namespace Microsoft.Office.InfoPath&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Summary:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Implements the events raised by changes to the data in the underlying XML&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document of a form instance.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public abstract class XmlEvent&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected XmlEvent();&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public abstract bool RaiseUndoRedoForChanged { get; set; }&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public abstract event 
XmlChangedEventHandler Changed;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public abstract event XmlValidatingEventHandler 
Validating;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/b&gt;&lt;/p&gt;</description></item><item><title>Re: Restricting user form deleting node in repeating section but not adding</title><link>https://www.infopathdev.com:443/forums/thread/37279.aspx</link><pubDate>Sat, 17 Jan 2009 16:23:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37279</guid><dc:creator>guptasourav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37279.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=37279</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;This is strange but I can see only Changed and validating events only. There is no changing event in it.&lt;/p&gt;&lt;p&gt;Are you using Infopath 2003? I am using Infopath 2007 and cannot see this option&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Restricting user form deleting node in repeating section but not adding</title><link>https://www.infopathdev.com:443/forums/thread/37270.aspx</link><pubDate>Sat, 17 Jan 2009 07:22:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37270</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37270.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=37270</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We have three events like changing, validating and changed. In these you have to choose ‘changing&amp;#39; event. To inset this event select the repeating section node,&lt;/p&gt;
&lt;p&gt;1. Go to properties - &amp;gt; Programming.&lt;/p&gt;
&lt;p&gt;2. Select ‘Changing Event..&amp;#39; event&lt;/p&gt;
&lt;p&gt;Then it will insert the changing event for your code.&lt;/p&gt;</description></item><item><title>Re: Restricting user form deleting node in repeating section but not adding</title><link>https://www.infopathdev.com:443/forums/thread/37267.aspx</link><pubDate>Sat, 17 Jan 2009 06:35:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37267</guid><dc:creator>guptasourav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37267.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=37267</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks Shiva for the reply,&lt;/p&gt;&lt;p&gt;But I cannot see&amp;nbsp; XmlChangingEventArgsXml event in my code behind. Do I need to add that manually? I even tried to add that manually but there is no such&amp;nbsp; event handler present except validating and changed.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Restricting user form deleting node in repeating section but not adding</title><link>https://www.infopathdev.com:443/forums/thread/37264.aspx</link><pubDate>Sat, 17 Jan 2009 05:56:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37264</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37264.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=37264</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We can restrict depend on e.operation value. If e.operation is equal to ‘delete&amp;#39; then you have to write the below code,&lt;/p&gt;
&lt;p&gt;public void group2_Changing(object sender, XmlChangingEventArgs e)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;if (e.Operation.ToString() == &amp;quot;Delete&amp;quot;)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;e.CancelableArgs.Cancel = true; &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Using above code you will get one message.&lt;/p&gt;</description></item><item><title>Restricting user form deleting node in repeating section but not adding</title><link>https://www.infopathdev.com:443/forums/thread/37255.aspx</link><pubDate>Sat, 17 Jan 2009 00:22:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37255</guid><dc:creator>guptasourav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37255.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=37255</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;I am using a browser enabled form in Infopath 2007. I want to restrict some users depending upon the role. The restriction is, I do not want to delete node from repeating section but they can add more. In Infopath there is option to restrict both adding and deleting simultaneously. &lt;/p&gt;&lt;p&gt;Is there a way where I can restrict user from deleting but not adding new item in the repeating section.&lt;/p&gt;&lt;p&gt;Can we do some thing on Repeatingsection_Changed event to restrict? &lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>