Print Page | Close Window

how to indicate childs counts in the group field?

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=11671
Printed Date: 17 November 2024 at 7:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to indicate childs counts in the group field?
Posted By: jshan
Subject: how to indicate childs counts in the group field?
Date Posted: 31 July 2008 at 4:16am
HI.
 
how to indicate childs counts of the groups in the group field ?
for example.
 
(+) Date: 2008-08-01 (123)  <--
 
Seems need to override Populate() though, too many things to modify for proteced variables. or am i missing something simple way ?
 
regards.
 



Replies:
Posted By: jshan
Date Posted: 31 July 2008 at 5:24am

Hm..  Overriding again..


void CXTPListCtrlEx::Populate()
{
 CXTPReportControl::Populate();
 EditItem(NULL);
 BeginUpdate();
 CString strCaption;
 CXTPReportGroupRow* pGroup = NULL;
 CXTPReportRow* pRow = NULL;
 
 for (int nPlainRow = 0; nPlainRow < m_pPlainTree->GetCount(); nPlainRow++)
 {
  pRow = m_pPlainTree->GetAt(nPlainRow);
  if(pRow->IsGroupRow()) {
   strCaption.Format(_T("(%d)"), pRow->GetChilds()->GetCount());
   pGroup = (CXTPReportGroupRow*)pRow;
   strCaption = pGroup->GetCaption() + strCaption;
   pGroup->SetCaption(strCaption);
  }
  pRow->InternalAddRef();
 }
 EndUpdate();
}
 
No idea.. If it's an appropriate way or not though, it works.
 
and unfortunately, it seems GroupRow doesn't support MarkUp
 


-------------
: xtp 16.2.0(Unicode static lib)

: windows 7 Pro Kor sp1(64bit)

: vs 2012 update 2 MFC




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