Print Page | Close Window

Get Group State failed in XTP_NM_REPORT_GROUPORDER

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=15539
Printed Date: 29 September 2024 at 1:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Get Group State failed in XTP_NM_REPORT_GROUPORDER
Posted By: FSauer
Subject: Get Group State failed in XTP_NM_REPORT_GROUPORDER
Date Posted: 03 November 2009 at 7:00am
Hello,

i would like to get the group-state in the notify message XTP_NM_REPORT_GROUPORDER of my recordctrl.

If the ReportCtrl is group by an column the IsShowItemsInGroups allways return FALSE.

Below my code:

void CFormView1::OnReportGroupOrderChanged(NMHDR*  pNotifyStruct, LRESULT* /*result*/)
{
    XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;
    ASSERT(pItemNotify != NULL);

    BOOL bIsGroup=FALSE;
    if(pItemNotify->pRow && pItemNotify->pRow->GetControl() && pItemNotify->pRow->GetControl()->GetReportHeader() &&
        pItemNotify->pRow->GetControl()->GetReportHeader()->IsShowItemsInGroups())
    {
    
// Never comes in, because pItemNotify->pRow->GetControl() returns NULL!

        bIsGroup=TRUE;           
    }
    else if(m_wndReportCtrl.GetReportHeader() && m_wndReportCtrl.GetReportHeader()->IsShowItemsInGroups())
    {

// Never comes in, too, beacause IsShowItemsInGroups return FALSE!

        bIsGroup=TRUE;            
    }

...
}


What is wrong?
Anybody an idea?




Replies:
Posted By: FSauer
Date Posted: 03 November 2009 at 7:36am
Solution:
    BOOL bIsGroup=FALSE;
    if(m_wndReportCtrl.GetColumns()->GetGroupsOrder() &&
        m_wndReportCtrl.GetColumns()->GetGroupsOrder()->GetCount())
    {
        bIsGroup=TRUE;            
    }



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