Print Page | Close Window

Changed behaviour of Populate method

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=20082
Printed Date: 28 September 2024 at 5:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Changed behaviour of Populate method
Posted By: apautrot
Subject: Changed behaviour of Populate method
Date Posted: 24 August 2012 at 4:46am
Hi, since we changed our version to the 15.31 we now have this different behavior : Populate method now call a selection clear that ends in a notification to the listener of the message XTP_NM_REPORT_SELCHANGED. This was not the case with the previous version we used, the 15.13.

We have to embrace our code with a lock counter to avoid reacting to selection change notification.

selectionLockCount++;
_report.Populate();
selectionLockCount--;

void OnSelectionChanged(NMHDR* pNotifyStruct, LRESULT* pResult)
{
if  (selectionLockCount == 0)
{
...
}
}

Hope that knowing that might help other programmers.


-------------


Win 7 x64
VS 2008
CJ 15.13




Replies:
Posted By: Luza
Date Posted: 16 November 2012 at 11:51am
I changed to 15.3.1 from 13.3.1 just now.

Have the same problem. App crashes because of this call.
I use a CXTPReportView which has a CXTPReportControl.
I do not derive from CXTPReportControl so i can not use your solution.

I looked at the added functionality in the Populate function and i see some added Behavior functions?!

Just added this after creating the CXTPReportView.

//m_pProjectTreeView is derived from CXTPReportView.
// Obtain the target report
//CXTPReportControl* CProjectTreeView::GetTargetReport()
//{
//   return &(GetReportCtrl());
//}

  m_pProjectTreeView->GetTargetReport()->GetBehavior()->Notifications->Populate->bSelectionChanged = false;


This will do the trick. Smile

I do not know what GetBehavior()->Notifications->Populate->bSelectionChanged does.
But as far as i can tell everything works just fine when its false.Wacko





-------------
Product: ToolKit Pro SDK 15.3.1
Platform: Windows 7 SP1
Language: Visual C++


Posted By: mgampi
Date Posted: 20 November 2012 at 1:12pm
Hi;

Have you tried to set

CXTPReportControl::m_bInitialSelectionEnable=FALSE;




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

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



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