Print Page | Close Window

Unable to replace item on the fly

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=24360
Printed Date: 21 November 2024 at 10:49am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Unable to replace item on the fly
Posted By: mgampi
Subject: Unable to replace item on the fly
Date Posted: 16 February 2023 at 11:27am
Hi;

I need to replace an CXTPReportRecordItem type on the fly (e.g from CXTPReportRecordItem to CXTPReportRecordItemNumber). For that I tried to write a ReplaceItem function within my CXTPReportRecord derived class:
CXTPReportRecordItem* CMyBrilliantRecord::ReplaceItem(UINT Index, CXTPReportRecordItem* NewItem) {

  if (Index<m_arrItems.GetSize()) {
    m_arrItems[Index]->InternalRelease();
    m_arrItems[Index]=NewItem;
    NewItem->m_pControl = m_pControl;
    NewItem->SetRecord(this);
    return NewItem;
  }
  return nullptr;
}

But it can't compile, because the m_pControl member of the CXTPReportRecordItem class is protected and I can't find a SetReportControl() member function - similar to SetRecord() member function.

Can you at CJ add this function in next release to enable the required feature?

TIA


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



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