DoPropExchange error |
Post Reply |
Author | |
roychr
Newbie Joined: 06 December 2006 Location: Canada Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 02 April 2007 at 3:36pm |
There is an error that slips in when the control loads back values from a file : After rebuilding my columns i do a DoPropExchange to set back user saved columns layout. Then the report does not seems to have any redraw message anymore. My report control is a sub-class of CXTPReportControl and is embedded into a sub-class of CXTPReportView. Why does the view not redraw itself properly after the doPropExchange is beyond me. When i scroll from left to Right the bounding for selection is not redrawed and stops at the last displayed column before the scrolling. The selection line spawns full line, and elements in all the cells seems to be redrawed with a bit of distortion. Columns have events enabled after scrolling beyond the former display zone, but no selection or click item event happens afterwards in the region after last column of the former displayed view.
i have the following coe for saving :
all my routines are in the Sub-classed report view but are only affecting the report-control inside it.
CCftpo6PositionReportView::OnReportViewLoadXmlColumnsConfig(CAsstBaseReportControl& Report)
{
CCftpo6XmlConfiguration* configXml = CCftpo6StaticObjects::GetXmlConfiguration();
if(configXml->Load())
{
CRuntimeClass* prt = this->GetRuntimeClass();
//Get section from xml
CXTPPropExchangeSection pxReportControl(configXml->GetPropertyExchangeNode()->GetSection(_T(prt->m_lpszClassName)));
//load from file (call original DoPropExchange, not overriden)
Report.DoPropExchange(&pxReportControl);
}
}
CCftpo6PositionReportView::OnReportVideSaveXmlColumnsConfig(CAsstBaseReportControl& Report)
{
CCftpo6XmlConfiguration* configXml = CCftpo6StaticObjects::GetXmlConfiguration();
configXml->PrepareToSave(); CRuntimeClass* prt = this->GetRuntimeClass();
//Get section from xml
CXTPPropExchangeSection pxReportControl(configXml->GetPropertyExchangeNode()->GetSection(_T(prt->m_lpszClassName)));
pxReportControl->EmptySection();
Report.DoPropertyExchange(&pxReportControl);
configXml->Save();
configXml->ReleaseFile(); }
my content of my xml file (cftpo6App.config)
...
<CCftpo6PositionReportView>
<Columns>
<Column ItemIndex="0"
Alignment="2"
AutoWidth="100/>
...this goes on up to my last column...
<Column ItemIndex="28"
Alignment="1"
AutoWidth="100"/>
</Columns>
</CCftpo6PositionReportView>
...
The question remains that since i do not use CXTPReportControl with CXTPReportView, is there problems that can rise by subclassing both and adding functionality to them ? I did not change any of the base implementations of DoPropExchange for both objects, but the DoPropExchange of the View is not called, i call my own save/load functions. The Save/Load Function works well throughout the application, i am pretty sure there is some member values that are resetted that should not. Please look into it, we really need this to work.
Christian Roy
Senior System Analyst
Land Software Engineering Center
Canada
|
|
roychr
Newbie Joined: 06 December 2006 Location: Canada Status: Offline Points: 2 |
Post Options
Thanks(0)
|
Please note that i am using version 10.3 of codejock with MFC under visual studio 2005 with service pack 1.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |