Indent Problem |
Post Reply |
Author | |
securigy
Groupie Joined: 23 November 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
Posted: 31 March 2009 at 2:11pm |
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Do you try to call ShowGroupBy after Populate call? Same for GetGroupOrder()->Add calls? Also you need to check current version (13.1) - here you can get static app to try: https://forum.codejock.com/uploads/DemoVersion/ReportSampleSatic.rar
|
|
securigy
Groupie Joined: 23 November 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
|
are you saying the the order of the calls is not correct? if that's the case what should it be? populating the control with data comes way later when I have the data. actually, the problem is not with the ident of the group and subgroup - they are indented fine... the problem is that the data that I gather later and add to a subgroup is not indented... - pls see the file that I uploaded (link is in my original post)
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
You uploaded file based on old version. Please re-run with current and we can talk later. I propose also call layout adjustment after populate - why don't try it?
I also don't know how you add new records as child records? Need code to check. But refresh all to current version first
|
|
securigy
Groupie Joined: 23 November 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
|
I requested v13.1 and waiting for response. Meanwhile I tried this after adding each record:
if(pMsg)
this->SendMessage(WM_ADD_RECORD_EX, (WPARAM)pMsg, 0);
SetTreeIndent(10); AdjustLayout(); RedrawWindow(0, 0, RDW_ALLCHILDREN|RDW_INVALIDATE); neither of it helps. |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
run recommended sample. from menu call TreeView Dlg - see how indenting done for subject items - click on expand little button to see. I can give you the code for this dialog
|
|
securigy
Groupie Joined: 23 November 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
|
the code sample will certainly help.
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
This is a demo to add new child records run-time on mouse r-click on report row
afx_msg void OnReportRClick(NMHDR * pNotifyStruct, LRESULT * result);ON_NOTIFY(NM_RCLICK, IDC_REPORT, OnReportRClick) void CTreeViewDlg::OnReportRClick(NMHDR * pNotifyStruct, LRESULT * /*result*/){ XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct; if (pItemNotify->pRow) { // TRACE(_T("Right click on row %d\n"), pItemNotify->pRow->GetIndex()); COleDateTime odtSent(COleDateTime::GetCurrentTime()); COleDateTime odtCreated(COleDateTime::GetCurrentTime()); COleDateTime odtReceived(COleDateTime::GetCurrentTime()); CString strMessage( " ");CString strEmpty( " ");odtSent -= 8; CMessageRecord* pRec = new CMessageRecord(msgImportanceNormal, TRUE, TRUE,_T( "Somebody"), _T("I Understand!"), odtSent, 24, FALSE, 5.4321,odtCreated, odtReceived, strEmpty, strEmpty, strMessage, strEmpty, strEmpty, strEmpty, strEmpty, strEmpty, strMessage); CXTPReportRecord* pNew = pItemNotify->pRow->GetRecord()->GetChilds()->Add(pRec); if (pNew)pItemNotify->pRow->SetExpanded(TRUE, TRUE); m_wndReport.Populate(); } } |
|
securigy
Groupie Joined: 23 November 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
|
here what I discovered: I used AddRecordEx to add records and apparently it does not work correctly.
I switched to AddRrcord + Populate and it works well now.
THank you Mark.
|
|
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 |