Print Page | Close Window

ReportCtrl... no method to remove items

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2183
Printed Date: 08 November 2025 at 2:19am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ReportCtrl... no method to remove items
Posted By: bevpet
Subject: ReportCtrl... no method to remove items
Date Posted: 04 May 2005 at 11:55am

Hi.

i'm trying to clear the contents of my report control after a call to myctrl.addrecord(...), i can't seem to find a method to clear the the items that were added.

i need to clear the previous contents, so the display can be updated with current content.

if anyone knows of the method to accomplish this, it would be greatly appreciated.

thanks

Peter

 




Replies:
Posted By: sserge
Date Posted: 04 May 2005 at 3:28pm
Hello Peter,

Try calling Populate() for updating.

From the documentation: "As a finalization of adding data to the report control, which means adding columns and records, Populate() method should be called. It performs population of control rows with data - creates a rows tree if necessary, rebuilds groups if grouping if enabled, and sorts rows on a specified manner. "

--
WBR,
Serge


Posted By: bevpet
Date Posted: 04 May 2005 at 6:10pm

Hi Serge,

i've done that (called .populate()). My data is showing up fine, what the problem is that the reportctrl is refreshed every 15mins from my database, when it does, it duplicates the items on the report control, because i have no way of removing the previous items that were on it. i'm looking for a method  on the control like on the standard list control's .DeleteAllItems() method, which removes all items from the list,

thanks for your help

Peter



Posted By: walgar
Date Posted: 04 May 2005 at 11:41pm

 

Try:

GetRecords()->RemoveAll()

You can then add new records and call Populate().

Walgar.

 

Originally posted by bevpet bevpet wrote:

Hi Serge,

i've done that (called .populate()). My data is showing up fine, what the problem is that the reportctrl is refreshed every 15mins from my database, when it does, it duplicates the items on the report control, because i have no way of removing the previous items that were on it. i'm looking for a method  on the control like on the standard list control's .DeleteAllItems() method, which removes all items from the list,

thanks for your help

Peter



Posted By: bevpet
Date Posted: 05 May 2005 at 7:05pm

Hi Walgar,

that did the trick.

 

greatly appreciated, thanks

Peter




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