Problems with Populate() now auto-selecting a row |
Post Reply |
Author | |
drisch
Groupie Joined: 06 July 2006 Status: Offline Points: 16 |
Post Options
Thanks(0)
Posted: 13 April 2012 at 10:45am |
We use report controls extensively in our applications (probably more than 20 in each) and we recently upgraded from XTP 15.2.1 to 15.2.1.0403 to address a crash when dragging a grouped field onto the report. However we almost immediately began noticing very strange behavior all over our application. It turns out that each time we load data into the report control, an item is now auto-selected. Since we often respond to a user selection of data, we had the application going crazy and selecting things by itself all over the place in response to Populate calls as we often show subdetails from one item in a second report, and their children in a third. We don't want a cascading effect if the user is not actually physically clicking on the row. Here is the new piece of code inserted after the initial release of 15.2.1 at the end of CXTPReportControl::Populate(). We are not sure why this new piece of code is here. There doesn't seem to be any mention of this in the release notes. Is this a new feature?. Why is the default behavior now to send a selection changed message on populate? The CXTPReportBehavior class is not even documented. I suppose we can go to each of our report controls and set the bSelectionChanged variable to false, but would it not make more sense that this should be false by default if this makes such a big change in behavior? For now we are thinking of rolling back to the initial 15.2.1 release and live with the bugs that the hotfix resolves rather than trying to patch this new behavior and possibly miss some cases. Derek |
|
fjosesen
Groupie Joined: 30 June 2008 Status: Offline Points: 49 |
Post Options
Thanks(0)
|
Hi,
I'm also experiencing problems when dropping an element. Now, the first row in the control is selected, scrolling up to it. So, it's very annoying to play with drag and drop. I'm not sure if it is the same problem that described in this post. I'm also using the ActiveX version of the control. Can anyone tell us anything about how to activate/simulate the previous behaviour? Kind regards, Sen |
|
Products: Suite Pro (ActiveX) v18.0.1
Toolkit Pro (MFC) v18.0.1 Platform: Windows 10 (64bit) Language: VC++ 2013 (MFC) |
|
drisch
Groupie Joined: 06 July 2006 Status: Offline Points: 16 |
Post Options
Thanks(0)
|
We seem to have found a solution which we are testing. We call the following on the CXTPReportControl item and this seems to prevent auto-selection. InitialSelectionEnable(FALSE); -Derek
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
this is a bugfix. The report control has always selected the first row on populate if InitialSelectionEnable was enabled, but hasn't send the notification that the selection has changed. If you do not want this message to be send, you can set GetBehavior()->Notifications->Populate->bSelectionChanged to FALSE. Andre |
|
Codejock support
|
|
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 |