Print Page | Close Window

How to implement OnSelectionChanging?

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=7472
Printed Date: 10 May 2024 at 10:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to implement OnSelectionChanging?
Posted By: mgampi
Subject: How to implement OnSelectionChanging?
Date Posted: 28 June 2007 at 11:39am
Hi;
does anyone know how to implement a OnSelectionChanging function into the report control to have an opportunity to cancel any outstanding changes to the currently focused row?
 
It would be fine if the control sends a XTP_NM_REPORT_SELECTIONCHANGING notification to the owner of the control before the new row gets selected. I looked into the report samples with no success.
So any hints on how to do it are very welcome... 


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

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



Replies:
Posted By: sserge
Date Posted: 05 July 2007 at 3:46pm
Hi,

There is an XTP_NM_REPORT_SELCHANGED event fired.
 
Remember currently focused row, which you don't want to change, and use CXTPReportControl::SetFocusedRow to return selection back.
 
Also use some internal flag in XTP_NM_REPORT_SELCHANGED to avoid recurrent sending of XTP_NM_REPORT_SELCHANGED event.
 
See SetFocusedRow implementation for more details.

--
WBR,
Serge


Posted By: mgampi
Date Posted: 09 July 2007 at 6:12am
Hi Serge,
you solution works, but it first sets the focus to the new row, resulting in a unwanted flickering of selections.
Any ideas how to prevent this?
 


-------------
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