Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl sorting
Re: ArrayCtrl sorting [message #13310 is a reply to message #13274] Mon, 31 December 2007 18:48 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
michael wrote on Fri, 28 December 2007 04:42

What is the best method to sort an ArrayCtrl?

array.sort(column)?
array.SetSortColumn(int ii, bool descending = false)?

If i use array.sort(column), how can i set the sort order?

Or is SetSortColumn or ToggleSortColumn(int ii) the better way to sort an ArrayCtrl?

It would be nice if someone could provide an example how to change the sort order of an ArrayCtrl.


SetSortColumn is more for GUI/user sorting (user clicks on column he wants to sort).

Use .Sort. That way you can use "Order" variant to provide more complex sorting predicate (based on all columns).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Selection changes before LostFocus() is called
Next Topic: How to change GridCtrl background color
Goto Forum:
  


Current Time: Mon May 20 02:00:21 CEST 2024

Total time taken to generate the page: 0.00672 seconds