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 » Adding new row to GridCtrl... How to force a resort?
Re: Adding new row to GridCtrl... How to force a resort? [message #23383 is a reply to message #23376] Thu, 15 October 2009 19:02 Go to previous messageGo to previous message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
Ok, this is done and ReSort() now exists. However, it does not seem to be paying attention to the actual sort order as specified by the user at the time ReSort() is called. For example, I have:

[ Date ] [ Name ] [ Number ]
----------------------------
10/12/09 Jim Doe  3.4
10/10/09 John Doe 12.5
05/18/07 Jeff Doe 5.0


The current sort order is Date Descending. When I edit "John Doe" and change the date to "10/18/09" and call ReSort() I get:

[ Date ] [ Name ] [ Number ]
----------------------------
05/18/07 Jeff Doe 5.0
10/12/09 Jim Doe  3.4
10/18/09 John Doe 12.5


Now, to make matters worse when sorting by Number, changing John Doe from 12.5 to 0.1, then calling .ReSort(), it resorts according to Date Ascending order, not Number which is what I had selected at the time.

My setup code for the grid sets initially:

log.Sort(FLIGHT_DATE);


So, it seems to always be reverting to that not what the user may have changed it to.

Any ideas?

Jeremy
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Doing my own thing with the ADD button on GridCtrl?
Next Topic: Arrayctrl and scroll lines
Goto Forum:
  


Current Time: Mon May 13 02:51:17 CEST 2024

Total time taken to generate the page: 0.01948 seconds