Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - ReportCtrl... no method to remove items
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ReportCtrl... no method to remove items

 Post Reply Post Reply
Author
Message
bevpet View Drop Down
Newbie
Newbie
Avatar

Joined: 01 April 2005
Location: Canada
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote bevpet Quote  Post ReplyReply Direct Link To This Post Topic: ReportCtrl... no method to remove items
    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

 

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
bevpet View Drop Down
Newbie
Newbie
Avatar

Joined: 01 April 2005
Location: Canada
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote bevpet Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
walgar View Drop Down
Newbie
Newbie


Joined: 13 February 2005
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote walgar Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
bevpet View Drop Down
Newbie
Newbie
Avatar

Joined: 01 April 2005
Location: Canada
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote bevpet Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2005 at 7:05pm

Hi Walgar,

that did the trick.

 

greatly appreciated, thanks

Peter

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.