Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - MultiSort GetSortOrder Runtime
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MultiSort GetSortOrder Runtime

 Post Reply Post Reply
Author
Message
developer View Drop Down
Newbie
Newbie


Joined: 05 August 2004
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote developer Quote  Post ReplyReply Direct Link To This Post Topic: MultiSort GetSortOrder Runtime
    Posted: 14 June 2007 at 5:00pm
I am trying to sort the columns through code and it is not working. what am I doing wrong???

  // Group by type
  CXTPReportColumn* pCol = m_wndReport.GetColumns()->Find(COLUMN_TYPE);
  m_wndReport.GetColumns()->GetGroupsOrder()->Clear();
    m_wndReport.GetColumns()->GetGroupsOrder()->Add(pCol);
 
  // Clear Sort Order
  m_wndReport.GetColumns()->GetSortOrder()->Clear();
 
  // Sort by checked first
  pCol = m_wndReport.GetColumns()->Find(COLUMN_CHECK);
  m_wndReport.GetColumns()->GetSortOrder()->Add(pCol, TRUE);
 
  // Then sort by Name
  pCol = m_wndReport.GetColumns()->Find(COLUMN_NAME);
    m_wndReport.GetColumns()->GetSortOrder()->Add(pCol, TRUE);
 
  ASSERT(m_wndReport.GetColumns()->GetSortOrder()->GetCount() == 2);

this is not sorting it at all.. I would like to first sort by the checked items (have them at top) and then sort the rest by the name..
Back to Top
developer View Drop Down
Newbie
Newbie


Joined: 05 August 2004
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote developer Quote  Post ReplyReply Direct Link To This Post Posted: 14 June 2007 at 5:03pm
m_wndReport.Populate();
Back to Top
developer View Drop Down
Newbie
Newbie


Joined: 05 August 2004
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote developer Quote  Post ReplyReply Direct Link To This Post Posted: 14 June 2007 at 5:32pm
populate is called after the above setup.. uhg. why can't I edit my own posts?? :(
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.