Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - UpdateData for CXTPReportRecord
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

UpdateData for CXTPReportRecord

 Post Reply Post Reply
Author
Message
Moritz View Drop Down
Groupie
Groupie
Avatar

Joined: 22 December 2005
Location: Germany
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Moritz Quote  Post ReplyReply Direct Link To This Post Topic: UpdateData for CXTPReportRecord
    Posted: 11 November 2006 at 8:38am

Hi Folks, i implemented my own UpdateData function for a derived CXTPReportRecord. Because VirtualMode is useless in most cases where you would need it i decided to stick to normal mode and create per already existing storage item a new CXTPReportRecord

BUT I use a pointer in each derived CXTPReportRecord to my original storage object. I overrided CXTPReportControl::Populate to call UpdateData() on every CXTPReportRecord to refresh visible Captions in every row.

The other way round, if a row is edited it calls UpdateData(true) and sets the new values for the storage object via it's pointer. So my internal storage is always synchronised to the visible data and vice versa.

I think it would be very usefull to habe such a behavior in the standard CXTPReportControl / CXTPReportRecord. Also to complete it 100% you should have Object binding like in CXTPPropertyGridItem for all CXTPReportRecordItems (and a Refresh() function to Populate).

Another suggestion is to have a Remove(CXTPReportRecord*) function like "Add" in CXTPReportControl to remove a record and its according row without losing the focused row (or scrolling to toprow automatically like now) when manually deleting a record by CXTPReportRecord->Remove() and using Populate afterward. The standard behavior is that the actually delete recordrow gets deleted and afterward the focus goes automatically to the first row, scrolling the whole view. This is not Outlook behavior, in Outlook if i delete one row the next or previous row gets highlited and not scrolled to first row in view.

Greetings, Moritz Leutenecker

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.156 seconds.