![]() |
ReportControl tree sorting |
Post Reply
|
| Author | |
haiku
Newbie
Joined: 30 November 2004 Location: Poland Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Topic: ReportControl tree sortingPosted: 05 May 2005 at 1:59am |
|
How to sort tree in ReportControl to sort subtrees also ? Has anyone know some fast way how to do that ? Now you can sort only the top most leaves in the tree. Thank you for help, Haiku. |
|
![]() |
|
haiku
Newbie
Joined: 30 November 2004 Location: Poland Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 May 2005 at 2:09am |
|
I have changed the source code (this works fine): void CXTPReportRows::Sort(bool bSortChildren){ if (bSortChildren) { for(int i=0; i<GetCount(); ++i) { GetAt(i)->GetChilds()->Sort(bSortChildren); } } typedef int (_cdecl *GENERICCOMPAREFUNC)(const void *,const void*); qsort(m_arrRows.GetData(), (size_t)m_arrRows.GetSize(), sizeof (CXTPReportRow*), (GENERICCOMPAREFUNC)CompareRows); }
Edited by haiku |
|
![]() |
|
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 |