Print Page | Close Window

UpdateData for CXTPReportRecord

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=5492
Printed Date: 24 November 2024 at 4:37am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: UpdateData for CXTPReportRecord
Posted By: Moritz
Subject: UpdateData for CXTPReportRecord
Date 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




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