<?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 : [SOLVED]Possible exception after RemoveRecordEx</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : [SOLVED]Possible exception after RemoveRecordEx]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 07:22:50 +0000</pubDate>
  <lastBuildDate>Fri, 20 Dec 2024 08:14:02 +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=24531</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[[SOLVED]Possible exception after RemoveRecordEx : Hello,I&amp;#039;ve change function...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24531&amp;PID=79099&amp;title=solvedpossible-exception-after-removerecordex#79099</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> 24531<br /><strong>Posted:</strong> 20 December 2024 at 8:14am<br /><br /><div>Hello,</div><div><br></div><div>I've change function with next code</div><div><br></div><div>void CXTPGridRows::RemoveAt(int nIndex)<br>{<br>&nbsp;&nbsp;&nbsp; CXTPGridScreenRows* pScreenRows = GetScreenRows();<br>&nbsp;&nbsp;&nbsp; if (pScreenRows)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; pScreenRows-&gt;GetCount(); i++)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (pScreenRows-&gt;GetAt(i) == m_arrRows.GetAt(nIndex))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pScreenRows-&gt;GetAt(i)-&gt;InternalRelease();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pScreenRows-&gt;RemoveAt(i);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; m_arrRows.GetAt(nIndex)-&gt;InternalRelease();<br>&nbsp;&nbsp;&nbsp; m_arrRows.RemoveAt(nIndex);<br>}</div><div><br></div><div>Note in last versions CXTPReport was renamed to CXTPGrid.</div><div>The fix will be available in the next beta or final release.</div><div><br></div><div>Regards,</div><div>Artem Gontarenko<br></div>]]>
   </description>
   <pubDate>Fri, 20 Dec 2024 08:14:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24531&amp;PID=79099&amp;title=solvedpossible-exception-after-removerecordex#79099</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED]Possible exception after RemoveRecordEx : uploads/9437/ReportDialog.zipI&amp;#039;ve...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24531&amp;PID=79098&amp;title=solvedpossible-exception-after-removerecordex#79098</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9437">DiZSl</a><br /><strong>Subject:</strong> 24531<br /><strong>Posted:</strong> 20 December 2024 at 3:22am<br /><br /><div><a href="uploads/9437/ReportDialog.zip" target="_blank" rel="nofollow">uploads/9437/ReportDialog.zip</a></div><div><br></div><div>I've modified your example by adding a "Button1" button. It deletes the last record and emulates clicking on that deleted record. After that GetCount method returns 1.<br></div><br>]]>
   </description>
   <pubDate>Fri, 20 Dec 2024 03:22:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24531&amp;PID=79098&amp;title=solvedpossible-exception-after-removerecordex#79098</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED]Possible exception after RemoveRecordEx : Hello,Thanks for you solution.How...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24531&amp;PID=79093&amp;title=solvedpossible-exception-after-removerecordex#79093</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> 24531<br /><strong>Posted:</strong> 17 December 2024 at 4:47am<br /><br />Hello,<br><br>Thanks for you solution.<br>How I can to reproduce this bug with our sample?<br><br>Regards,<br>Artem Gonarenko]]>
   </description>
   <pubDate>Tue, 17 Dec 2024 04:47:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24531&amp;PID=79093&amp;title=solvedpossible-exception-after-removerecordex#79093</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED]Possible exception after RemoveRecordEx : After calling RemoveRecordEx,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24531&amp;PID=79081&amp;title=solvedpossible-exception-after-removerecordex#79081</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9437">DiZSl</a><br /><strong>Subject:</strong> 24531<br /><strong>Posted:</strong> 29 November 2024 at 1:40am<br /><br />After calling RemoveRecordEx, it is essential to call UpdateWindows for the ReportControl. If this is not done and a user quickly clicks on the deleted record before the window is redrawn (updated), the function HitTest in CXTPReportControl::OnButton will return the deleted CXTPReportRow from the m_pScreenRows array, which is only updated during redrawing. However, the redraw has not yet occurred only invalidating, resulting in m_pScreenRows being out of sync with the main tree.<br><br>Additionally, when calling CXTPReportControl::OnButton, this removed CXTPReportRow will be passed to _SetSelectedRow, which will cause an index for a non-existent record to appear in the m_pSelectedRows array. As a result, m_pSelectedRows.GetCount will return 1, while m_pSelectedRows.GetAt(0) will return nullptr.<br><br>My solution (remove row from m_pScreenRows):<br>void CXTPReportRows::RemoveAt(int nIndex)<br>{<br>&nbsp;&nbsp;&nbsp; auto row = m_arrRows.GetAt(nIndex);<br>&nbsp;&nbsp;&nbsp; if (row != nullptr)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auto rows = GetScreenRows();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (rows != nullptr)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auto size = rows-&gt;GetCount();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; size; i++)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (rows-&gt;GetAt(i) == row)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; row-&gt;InternalRelease();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rows-&gt;RemoveAt(i);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; row-&gt;InternalRelease();<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; m_arrRows.RemoveAt(nIndex);<br>}<br><br>]]>
   </description>
   <pubDate>Fri, 29 Nov 2024 01:40:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24531&amp;PID=79081&amp;title=solvedpossible-exception-after-removerecordex#79081</guid>
  </item> 
 </channel>
</rss>