<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Moving rows</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Moving rows]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 05 Jun 2026 20:33:55 +0000</pubDate>
  <lastBuildDate>Mon, 10 Jul 2006 11:58:32 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=4558</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Moving rows : Serge,  That appears to have...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4558&amp;PID=14088&amp;title=moving-rows#14088</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1573">rock</a><br /><strong>Subject:</strong> 4558<br /><strong>Posted:</strong> 10 July 2006 at 11:58am<br /><br />Serge,<br><br>That appears to have done it.&nbsp; It works fine now.<br><br>Thanks<br>]]>
   </description>
   <pubDate>Mon, 10 Jul 2006 11:58:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4558&amp;PID=14088&amp;title=moving-rows#14088</guid>
  </item> 
  <item>
   <title><![CDATA[Moving rows : Hi,RemoveAt calls InternalRelease...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4558&amp;PID=14064&amp;title=moving-rows#14064</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4558<br /><strong>Posted:</strong> 09 July 2006 at 8:57am<br /><br />Hi,<br><br><b>RemoveAt </b>calls InternalRelease for a removed row, unlike <b>InsertAt</b>, which assumes recently created row object. So far, it looks like you have to add <b>pRow-&gt;InternalAddRef();</b> as a first operation in if (pRow) {...<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Sun, 09 Jul 2006 08:57:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4558&amp;PID=14064&amp;title=moving-rows#14064</guid>
  </item> 
  <item>
   <title><![CDATA[Moving rows : I have a dialog box that contains...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4558&amp;PID=14051&amp;title=moving-rows#14051</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1573">rock</a><br /><strong>Subject:</strong> 4558<br /><strong>Posted:</strong> 07 July 2006 at 4:58pm<br /><br />I have a dialog box that contains a Report Control and a CSpinButtonCtrl.&nbsp; I use the spin control to <b><u>successfully</u></b>move rows up or down within the Report control.&nbsp; However, when Iexit the dialog box I get an assertion error in the CXTPReportRowsdestructor during the call to CXTPReportRows::Clear().&nbsp;Specifically to the line pRow-&gt;InternalRelease();<br><br>My code for moving rows is:<br><br>void CSortReportDlg::OnDeltaposReportSpin(NMHDR* pNMHDR, LRESULT* pResult) <br>{<br>&nbsp;&nbsp;&nbsp; NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;<br><br>&nbsp;&nbsp;&nbsp; int number_rows = wndReport.GetRows()-&gt;GetCount();<br>&nbsp;&nbsp;&nbsp; int cur_item = wndReport.GetFocusedRow();<br>&nbsp;&nbsp;&nbsp; if (pNMUpDown-&gt;iDelta &gt; 0 &amp;&amp; cur_item &gt;= 0)&nbsp; // Move Up<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (cur_item == 0 || cur_item &gt;= number_rows)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPReportRow *pRow = wndReport.GetRows()-&gt;GetAt(cur_item);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pRow)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndReportGetRows()-&gt;RemoveAt(cur_item);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndReportGetRows()-&gt;InsertAt(cur_item - 1, pRow);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; else if (pNMUpDown-&gt;iDelta &lt; 0 &amp;&amp;cur_item &gt;= 0 &amp;&amp; cur_item &lt; (number_rows - 1))&nbsp; //Move Down<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (number_rows == 0 || cur_item == number_rows || cur_item &gt;= number_rows-1)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPReportRow *pRow = wndReport.GetRows()-&gt;GetAt(cur_item);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pRow)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndReportGetRows()-&gt;RemoveAt(cur_item);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wndReportGetRows()-&gt;InsertAt(cur_item + 1, pRow);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; *pResult = 0;<br>}<br><br>Have I missed some other function call I must make after moving the rows?<br>]]>
   </description>
   <pubDate>Fri, 07 Jul 2006 16:58:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4558&amp;PID=14051&amp;title=moving-rows#14051</guid>
  </item> 
 </channel>
</rss>