Print Page | Close Window

MultiSort GetSortOrder Runtime

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=7383
Printed Date: 22 November 2024 at 1:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: MultiSort GetSortOrder Runtime
Posted By: developer
Subject: MultiSort GetSortOrder Runtime
Date 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..



Replies:
Posted By: developer
Date Posted: 14 June 2007 at 5:03pm
m_wndReport.Populate();


Posted By: developer
Date Posted: 14 June 2007 at 5:32pm
populate is called after the above setup.. uhg. why can't I edit my own posts?? :(



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net