<?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] RemoveRecordEx(..) in Virtual Mode.</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : [SOLVED] RemoveRecordEx(..) in Virtual Mode.]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 08:01:00 +0000</pubDate>
  <lastBuildDate>Wed, 25 May 2011 08:12:59 +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=18437</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] RemoveRecordEx(..) in Virtual Mode. : Martin is right here, you can...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18437&amp;PID=64580&amp;title=solved-removerecordex-in-virtual-mode#64580</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1755">ABuenger</a><br /><strong>Subject:</strong> 18437<br /><strong>Posted:</strong> 25 May 2011 at 8:12am<br /><br />Martin is right here, you can not manipulate the report control in virtual mode.<br><br>]]>
   </description>
   <pubDate>Wed, 25 May 2011 08:12:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18437&amp;PID=64580&amp;title=solved-removerecordex-in-virtual-mode#64580</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] RemoveRecordEx(..) in Virtual Mode. : Hi;Whenever you delete records...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18437&amp;PID=64577&amp;title=solved-removerecordex-in-virtual-mode#64577</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 18437<br /><strong>Posted:</strong> 25 May 2011 at 5:59am<br /><br />Hi;<br><br>Whenever you delete records in virtual mode you have to perform it in the underlying (extern) data container (not part of the report control) then you have to call SetVirtualMode(new MyRecordType(...), NewNumberOfElements); followed by Populate();<br>I've never tried to manipulate the records collection of the report control directly in virtual mode since it makes no sense, but I believe thats absolutely wrong! The control only holds one dummy record and calls GetItemMetrics() whenever a row should be drawn.<br><br>]]>
   </description>
   <pubDate>Wed, 25 May 2011 05:59:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18437&amp;PID=64577&amp;title=solved-removerecordex-in-virtual-mode#64577</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] RemoveRecordEx(..) in Virtual Mode. :   Hello CJ Team,Deleting selected...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18437&amp;PID=64576&amp;title=solved-removerecordex-in-virtual-mode#64576</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2796">Makarand</a><br /><strong>Subject:</strong> 18437<br /><strong>Posted:</strong> 25 May 2011 at 5:38am<br /><br /><div>Hello CJ Team,</div><div><br></div><div>Deleting selected record from the virtual mode should decrease record count. Please go through following sample code</div><div><br></div><div><br></div><div>&nbsp;int count =GetReportCtrl().GetRecords()-&gt;GetCount();</div><div><font color="#990000">//eg. count is 100</font></div><div><font color="#990000">//Selected 10 records and delete them. Expected count should be 90</font></div><div>&nbsp;<span style="white-space: pre;">	</span>CXTPReportSelectedRows* pSelectedRows = GetReportCtrl().GetSelectedRows();</div><div><span style="white-space: pre;">	</span>if(!pSelectedRows)</div><div><span style="white-space: pre;">		</span>return;</div><div><span style="white-space: pre;">	</span>int nRow = pSelectedRows-&gt;GetCount() - 1;</div><div><span style="white-space: pre;">	</span>if(nRow &lt; 0)</div><div><span style="white-space: pre;">		</span>return;</div><div><span style="white-space: pre;">	</span>CWaitCursor wc;</div><div><span style="white-space: pre;">	</span>CXTPReportRow* pFocusedRow = pSelectedRows-&gt;GetAt(pSelectedRows-&gt;GetCount() - 1);</div><div><span style="white-space: pre;">	</span>pFocusedRow = GetRows()-&gt;GetAt(pFocusedRow-&gt;GetIndex() + 1);</div><div><span style="white-space: pre;">	</span>while(nRow &gt;= 0)</div><div><span style="white-space: pre;">	</span>{</div><div><span style="white-space: pre;">		</span>CXTPReportRecord* pRecord = pSelectedRows-&gt;GetAt(nRow--)-&gt;GetRecord();</div><div><span style="white-space: pre;">		</span>if(pRecord)</div><div><span style="white-space: pre;">			</span>GetReportCtrl().RemoveRecordEx(pRecord);</div><div><span style="white-space: pre;">		</span>if(nRow &gt;= pSelectedRows-&gt;GetCount())</div><div><span style="white-space: pre;">			</span>nRow = pSelectedRows-&gt;GetCount() - 1;</div><div><span style="white-space: pre;">	</span>}</div><div><span style="white-space: pre;">	</span>GetReportCtrl().SetFocusedRow(pFocusedRow ? pFocusedRow : GetReportCtrl().GetFocusedRow());</div><div><br></div><div>&nbsp;count =GetReportCtrl().GetRecords()-&gt;GetCount();</div><div><font color="#990000">//Actual count still 100&nbsp;<img src="http://forum.codejock.com/smileys/smiley7.gif" border="0" alt="Angry" title="Angry" /></font></div><div><br></div><div>Problem when it comes in the GetItemMetrics(..) and trying to fetch the records which are already deleted (Records from 90 to 100).</div><div><br></div><div>Waiting for reply.</div><div><br></div><div>-Mak</div>]]>
   </description>
   <pubDate>Wed, 25 May 2011 05:38:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18437&amp;PID=64576&amp;title=solved-removerecordex-in-virtual-mode#64576</guid>
  </item> 
 </channel>
</rss>