<?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: deleting repeating section row</title><link>https://www.infopathdev.com:443/forums/thread/77738.aspx</link><pubDate>Thu, 19 Apr 2012 12:38:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77738</guid><dc:creator>jaxkookie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77738.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=77738</wfw:commentRss><description>sorry for the bother. Not sure why I did not think of it. I just added between the 2 lines a MoveToParent. that did it</description></item><item><title>deleting repeating section row</title><link>https://www.infopathdev.com:443/forums/thread/77736.aspx</link><pubDate>Thu, 19 Apr 2012 12:17:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77736</guid><dc:creator>jaxkookie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77736.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=77736</wfw:commentRss><description>&lt;p&gt;by default adding a button to a repeating section row&amp;nbsp; and 2 lines of code allow deletion of that row&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&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; DeleteItem_Clicked(&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="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;ClickedEventArgs&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;        {&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;p&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPN&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; nodeToDelete = e.Source;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;
&lt;/font&gt;&lt;font size="2"&gt;nodeToDelete.DeleteSelf();&lt;/font&gt;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;Say my button is nested in a Section in that row. e.Source does not return the parent. in this type of schema how could I delete the node &amp;lt;reptsection&amp;gt;?&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&amp;lt;ReptSect&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;reptsection&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; ... fields&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;                           &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;nestedsection&amp;gt;contains button, but not visible in the schema&amp;lt;/nestedsection&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/reptsection&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&amp;lt;/ReptSect&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;  &lt;/font&gt;</description></item></channel></rss>