How to implement OnSelectionChanging? |
Post Reply |
Author | |
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
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 |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
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 |