RemoveRecordEx doesn't fix the selection |
Post Reply |
Author | |
JohnCrenshaw
Groupie Joined: 08 September 2006 Status: Offline Points: 65 |
Post Options
Thanks(0)
Posted: 13 July 2007 at 3:11pm |
OK, another signature bug with a fix. I fixed this one OUTSIDE of the Codejock library, but the fix should really be migrated to the library itself.
The problem was that calling RemoveRecordEx was leaving the selection at exactly the same indexes as before, which following a removal usually meant the wrong row. In my case, this was reall wierd, since clicking on a row would occasionally remove other rows in the report, causing the selected row to be a row other than the one that was clicked on.
The solution is fairly basic, and I have Outlined it below. In my case, I already had a derived class, so I just overloaded RemoveRecordEx, since it is virtual. The code below describes the fix.
One issue here is that fixing this in the library will break it for anybody that fixed it themselves outside the library, but I think the fix still belongs in CXTPReportControl, and not in subclasses for every program that uses it.
The fix:
|
|
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 |