<?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: Programmatically raising a infopath button click event</title><link>https://www.infopathdev.com:443/forums/thread/97643.aspx</link><pubDate>Mon, 26 May 2014 07:03:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97643</guid><dc:creator>Rommel Sta. Juana</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97643.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=97643</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Jimmy,&lt;/p&gt;&lt;p&gt;&amp;nbsp;Good day. I&amp;#39;m quite new to coding in Infopath. Do you have some time to explain the above. Thank you &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Programmatically raising a infopath button click event</title><link>https://www.infopathdev.com:443/forums/thread/52606.aspx</link><pubDate>Wed, 10 Mar 2010 17:21:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52606</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52606.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52606</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I&amp;#39;m sure the members here would appreciate it if you wouldn&amp;#39;t mind sharing your solution, but here is one solution:&lt;/p&gt;&lt;p&gt;Add a secondary XML data source with two fields: &amp;lt;ButtonA&amp;gt; and &amp;lt;ButtonB&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;For each of these fields, add two rules as the first two rules:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Condition: &amp;lt;Current Field&amp;gt; is blank.&amp;nbsp; Action: Stop executing rules&amp;nbsp; (no actual actions)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;(No condition)&amp;nbsp; Action: Set &amp;lt;Current Field&amp;gt; to blank&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Now move all of Button A&amp;#39;s rules to the &amp;lt;ButtonA&amp;gt; field beneath the above two rules, and do the same for ButtonB.&lt;/p&gt;&lt;p&gt;Also move ButtonA and ButtonB&amp;#39;s event handler code to the OnAfterChange events of the respective fields, and add a condition to the code to not do anything if the current field is blank.&lt;/p&gt;&lt;p&gt;Remove the rules and event handler code from both buttons, and give each button the single rule to set its respective field to some non-blank value.&lt;/p&gt;&lt;p&gt;Lastly, add code at the end of the &amp;lt;ButtonA&amp;gt; field&amp;#39;s event handler to set the &amp;lt;ButtonB&amp;gt; field to some non-blank value.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Programmatically raising a infopath button click event</title><link>https://www.infopathdev.com:443/forums/thread/52604.aspx</link><pubDate>Wed, 10 Mar 2010 17:08:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52604</guid><dc:creator>bubzo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52604.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52604</wfw:commentRss><description>&lt;p&gt;

Hi All

&lt;/p&gt;&lt;p&gt;&amp;nbsp;Just in case anyone wanted to know. This, in probablity, can&amp;#39;t be done. While doing this in ASP.NET is a breeze the same is not true. We have found alternative mechanisms to meet our functionality.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Bubzo&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Programmatically raising a infopath button click event</title><link>https://www.infopathdev.com:443/forums/thread/52396.aspx</link><pubDate>Wed, 03 Mar 2010 18:07:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52396</guid><dc:creator>bubzo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52396.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52396</wfw:commentRss><description>&lt;p&gt;I am trying to programmatically raise a infopath button click event from code behind. Is there any way this can be done?&lt;/p&gt;&lt;p&gt;Here&amp;#39;s what the situation is&lt;/p&gt;&lt;p&gt;1.This is for a Web-based form app&lt;br /&gt;&lt;/p&gt;&lt;p&gt;2. I have two buttons A and B, each has their rules and code behind&lt;/p&gt;&lt;p&gt;3. On clicking of button A, (after its rules and code behind are run) I need to programmatically simulate click of button B&lt;/p&gt;&lt;p&gt;4. Just calling the eventhandler of B from A doesn&amp;#39;t work since I also need to run the rules associated with A.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any help would be greatly appreciated.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here&amp;#39;s what I wanted to try but didn&amp;#39;t work&lt;/p&gt;&lt;p&gt;Call the OnClick method of button B from the event handler of button A using reflection.&amp;nbsp;&lt;/p&gt;&lt;p&gt;However, I wasn&amp;#39;t able to a) figure out &lt;/p&gt;&lt;p&gt;a) how to manufacture the DocActionEvent paramter that OnClick wants (since the eventhandler for button B doesn&amp;#39;t contain a proto that I could clone or something, instead it contains sender and ClickableEventArgs)&lt;/p&gt;&lt;p&gt;b) Not really sure who to create a Infopath Button Type to use in my code...&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>