Alphabetical Sorting Error |
Post Reply |
Author | |
EricM
Newbie Joined: 12 December 2005 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 13 December 2005 at 1:58am |
The column sorting in Report Controls does not seem to be correct, unless someone changed the alphabet and didn't tell me. : ) The following is considered to be sorted in ascending order by the Report Control: Bruce Wayne Note that capitilizing any letter throws it off, no matter if it's the first letter (notice the h-odejock) or the fourth letter (CodeTool shows up before CodeJock). I think the fix is probably the use of CString::CompareNoCase() instead of CString::Compare()... now to just trace where that comparison happens... E
|
|
EricM
Newbie Joined: 12 December 2005 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
After changing CString::Compare to CString::CompareNoCase in the following functions it seems to work fine now: CXTPReportRecordItem::CompareGroupCaption() I will admit that someone might want sorting to be case dependent in a Report Control, so my suggestion would be to put in a flag that allows such....?? E |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
It is only your choice how you'd like your captions to be compared for items of your columns. You can always override this behavious for your specific items like it is shown in the standard sample in a few implementations of CompareGroupCaption method.
-- WBR, Serge |
|
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 |