Print Page | Close Window

RemoveRecordEx

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=9329
Printed Date: 20 September 2024 at 6:43am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: RemoveRecordEx
Posted By: nvierros
Subject: RemoveRecordEx
Date Posted: 16 January 2008 at 7:52pm
Hey guys,

Small issue i need help with.

Im using RemoveRecordEx to delete items from the report control. Im trying to do this with multiple selections but it does not seem to work correctly.

Here is my code:


dim i as long
for i = 0 to reportcontrol.selectedrows.count - 1
reportcontrol.RemoveRecordEx reportcontrol.selectedrows(i).record
next

This works ok for the first record, but im assuming because the reportcontrol updates its internals, selectedrows will change.

Is it possible to do this without using the .populate method as i want to keep the view state???

Thanks in advance

Nick




Replies:
Posted By: wlcabral
Date Posted: 17 January 2008 at 2:43pm

Start from bottom to Top.

 
for i = reportcontrol.selectedrows.count - 1   To   0        Step -1



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net