![]() |
How to turn off sorting in Report Control |
Post Reply
|
| Author | |
robosport
Groupie
Joined: 20 June 2005 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
Quote Reply
Topic: How to turn off sorting in Report ControlPosted: 18 July 2005 at 3:35am |
|
I'm sure there is an easy answer to this and I've simply missed it in my searching on the forum and in the code... I'm using a CXTPReportControl with multiple columns. By default it sorts the first column alphabetically when I call Populate. How can I disable sorting so that the records are listed in the order that I added them? I've tried setting all columns->SetSortable( FALSE ); prior to calling Populate but that did not work. Thanks in advance. |
|
![]() |
|
sserge
Moderator Group
Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 July 2005 at 8:07am |
|
The control sorts records by 2 collections: GroupsOrder and SortOrder. If both of them contain zero elements, the sorting wouldn't be called.
So, please check elements count in CXTPReportColumns::GetGroupsOrder() and CXTPReportColumns::GetSortOrder() collections. -- WBR, Serge |
|
![]() |
|
robosport
Groupie
Joined: 20 June 2005 Location: United States Status: Offline Points: 62 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 July 2005 at 12:49pm |
|
Thank you sserge for the reply. I was able to call Clear for both CXTPReportColumns::GetGroupsOrder() and CXTPReportColumns::GetSortOrder() and then confirmed both were empty by using GetCount just before calling Populate. Unfortunately after calling Populate the Report Control is still sorted (no change) alphabetically by the first column. [UPDATE] Your solution was correct. I had recently switched my storage of the items to be put into the report from a std::vector to a std::map.
Thank you. Edited by robosport |
|
![]() |
|
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 |