Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - how to indicate childs counts in the group field?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to indicate childs counts in the group field?

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

Joined: 07 December 2007
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote jshan Quote  Post ReplyReply Direct Link To This Post Topic: how to indicate childs counts in the group field?
    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.
 
Back to Top
jshan View Drop Down
Groupie
Groupie
Avatar

Joined: 07 December 2007
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote jshan Quote  Post ReplyReply Direct Link To This Post 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

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