<?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 : RemoveAt Revisited</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : RemoveAt Revisited]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 16 May 2026 01:29:27 +0000</pubDate>
  <lastBuildDate>Wed, 18 Oct 2006 11:46:33 +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=4100</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[RemoveAt Revisited : I ended up doing it from the end...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16635&amp;title=removeat-revisited#16635</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1790">jcollier</a><br /><strong>Subject:</strong> 4100<br /><strong>Posted:</strong> 18 October 2006 at 11:46am<br /><br />I ended up doing it from the end up.&nbsp; However, you may want to look at the RemoveAt code sample in the documentation.&nbsp; It's doing what I was doing, which didn't work.<br><br>Thanks!<br>]]>
   </description>
   <pubDate>Wed, 18 Oct 2006 11:46:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16635&amp;title=removeat-revisited#16635</guid>
  </item> 
  <item>
   <title><![CDATA[RemoveAt Revisited : Anyway, I wouldn&amp;#039;t recomment...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16614&amp;title=removeat-revisited#16614</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4100<br /><strong>Posted:</strong> 18 October 2006 at 2:41am<br /><br />Anyway, I wouldn't recomment deleting rows in such way, just because of the same reason -- there could be possible a same problem as in the beginning of this topic...<br><br>Better to iterate them from the end up to beginning of the collection...<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Wed, 18 Oct 2006 02:41:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16614&amp;title=removeat-revisited#16614</guid>
  </item> 
  <item>
   <title><![CDATA[RemoveAt Revisited : Actually, I made a mistake in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16601&amp;title=removeat-revisited#16601</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1790">jcollier</a><br /><strong>Subject:</strong> 4100<br /><strong>Posted:</strong> 17 October 2006 at 1:22pm<br /><br />Actually, I made a mistake in the post.&nbsp; <br><br>Change: For Each row In rptDrawers.Rows<br><br>To: For Each row In rptDrawers.SelectedRows<br><br>I noticed I made that mistake this morning and changed it but I still have the same problem.<br><br>]]>
   </description>
   <pubDate>Tue, 17 Oct 2006 13:22:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16601&amp;title=removeat-revisited#16601</guid>
  </item> 
  <item>
   <title><![CDATA[RemoveAt Revisited :    jcollier wrote:Is there a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16598&amp;title=removeat-revisited#16598</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4100<br /><strong>Posted:</strong> 17 October 2006 at 12:40pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by jcollier" alt="Originally posted by jcollier" style="vertical-align: text-bottom;" /> <strong>jcollier wrote:</strong><br /><br />Is there a way to accomplish this using a "For Each"?<br><br>Dim row As ReportRow<br>&nbsp;<br>For Each row In rptDrawers.Rows<br>&nbsp;&nbsp;&nbsp; rptDrawers.Records.RemoveAt row.Index<br>Next row<br><br>rptDrawers.Populate<br><br></td></tr></table><br><br>I would not recommend this. Better to use <b>RemoveAll </b><br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Tue, 17 Oct 2006 12:40:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16598&amp;title=removeat-revisited#16598</guid>
  </item> 
  <item>
   <title><![CDATA[RemoveAt Revisited : Is there a way to accomplish this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16584&amp;title=removeat-revisited#16584</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1790">jcollier</a><br /><strong>Subject:</strong> 4100<br /><strong>Posted:</strong> 16 October 2006 at 5:56pm<br /><br />Is there a way to accomplish this using a "For Each"?<br><br>Dim row As ReportRow<br>&nbsp;<br>For Each row In rptDrawers.Rows<br>&nbsp;&nbsp;&nbsp; rptDrawers.Records.RemoveAt row.Index<br>Next row<br><br>rptDrawers.Populate<br><br>]]>
   </description>
   <pubDate>Mon, 16 Oct 2006 17:56:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16584&amp;title=removeat-revisited#16584</guid>
  </item> 
  <item>
   <title><![CDATA[RemoveAt Revisited : Yes, that did it, great topic!...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16563&amp;title=removeat-revisited#16563</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2342">Waescher</a><br /><strong>Subject:</strong> 4100<br /><strong>Posted:</strong> 16 October 2006 at 11:16am<br /><br />Yes, that did it, great topic! <img src="http://forum.codejock.com/smileys/smiley32.gif" border="0" align="absmiddle"><br><br>i really tried to solve that problem in my app without any success!<br><br>Thank you!<br><br>]]>
   </description>
   <pubDate>Mon, 16 Oct 2006 11:16:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=16563&amp;title=removeat-revisited#16563</guid>
  </item> 
  <item>
   <title><![CDATA[RemoveAt Revisited : Looks like the problem in the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=12564&amp;title=removeat-revisited#12564</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4100<br /><strong>Posted:</strong> 01 May 2006 at 6:10pm<br /><br />Looks like the problem in the line with RemoveAt. Note that Records and Rows could have different indexes (because of sorting, etc). So far, the corrected line would be:<br>wndReportControl<span style="font-weight: bold;">.Records</span>.RemoveAt (Row<span style="font-weight: bold;">.Record</span>.Index)<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Mon, 01 May 2006 18:10:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=12564&amp;title=removeat-revisited#12564</guid>
  </item> 
  <item>
   <title><![CDATA[RemoveAt Revisited : Thanks sserge. I was heading in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=12560&amp;title=removeat-revisited#12560</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=871">Gutauckis</a><br /><strong>Subject:</strong> 4100<br /><strong>Posted:</strong> 01 May 2006 at 2:44pm<br /><br /><P>Thanks sserge. I was heading in that direction but assumed that the control only marked the record for deletion but did not delete unitl it was populated again. I reversed my direction as you had suggested and all is good.... I need to stop assuming :)</P><P>The code I posted for the deleting of a record by pressing the delete key still does not work. I tried a few different ways to get it to work but no luck.</P><P>Maybe somebody else will figure it out...</P>]]>
   </description>
   <pubDate>Mon, 01 May 2006 14:44:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=12560&amp;title=removeat-revisited#12560</guid>
  </item> 
  <item>
   <title><![CDATA[RemoveAt Revisited : Hi,In your piece of code:Repor...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=12540&amp;title=removeat-revisited#12540</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 4100<br /><strong>Posted:</strong> 01 May 2006 at 4:39am<br /><br />Hi,<br><br>In your piece of code:<br>ReportControl.Records.RemoveAt(12)<br>ReportControl.Records.RemoveAt(14)<br>ReportControl.Records.RemoveAt(16)<br><br>Note that when you remove row 12, the overall number of rows is decresed, and the row which was 14, now becomes 13. To easily get round of this effect, just change the order of operations:<br><br>ReportControl.Records.RemoveAt(16)<br>ReportControl.Records.RemoveAt(14)<br>ReportControl.Records.RemoveAt(12)<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Mon, 01 May 2006 04:39:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=12540&amp;title=removeat-revisited#12540</guid>
  </item> 
  <item>
   <title><![CDATA[RemoveAt Revisited : Okay I continue to figure this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=12533&amp;title=removeat-revisited#12533</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=871">Gutauckis</a><br /><strong>Subject:</strong> 4100<br /><strong>Posted:</strong> 30 April 2006 at 8:22pm<br /><br />Okay I continue to figure this out so I copy the code from thje sample of RemoveAt: This code when executed removes (deletes) the record after the one selected not the one selected....<br><br><font ="keyword">Private</font> <font ="keyword">Sub</font> wndReportControl_KeyDown(KeyCode <font ="keyword">As</font> <font ="keyword">Integer</font>, Shift <font ="keyword">As</font> <font ="keyword">Integer</font>)<br>&nbsp;&nbsp;&nbsp;&nbsp;<font ="keyword">On</font> <font ="keyword">Error</font> <font ="keyword">Resume</font> <font ="keyword">Next</font><br><br>&nbsp;&nbsp;&nbsp;<font ="comment">'If the delete key is pressed (Delete's keycode = 46) then remove all selected rows</font><br>&nbsp;&nbsp;&nbsp;<font ="keyword">If</font> (KeyCode = 46) <font ="keyword">Then</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font ="keyword">Dim</font> Row <font ="keyword">As</font> ReportRow<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font ="comment">'Enumerate through each selected row in the ReportControls collection of selected rows</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font ="keyword">For</font> <font ="keyword">Each</font> Row <font ="keyword">In</font> wndReportControl.SelectedRows<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<font ="comment">'Removes the selected row, to remove a row you must remove the record attached to the row</font><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;wndReportControl.Records.RemoveAt (Row.Index)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font ="keyword">Next</font><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font ="comment">'Any time you add or delete rows(by removing the attached record), you must call the</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font ="comment">'Populate method so the ReportControl will display the changes, the rows will remain</font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font ="comment">'visible until the Populate method is called</font><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wndReportCon trol.Populate<br>&nbsp;&nbsp;&nbsp;&nbsp;<font ="keyword">End</font> <font ="keyword">If</font><br><font ="keyword">End</font> <font ="keyword">Sub<br><br><br></font>]]>
   </description>
   <pubDate>Sun, 30 Apr 2006 20:22:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4100&amp;PID=12533&amp;title=removeat-revisited#12533</guid>
  </item> 
 </channel>
</rss>