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 » Restore original row order
Restore original row order [message #52256] Mon, 19 August 2019 11:33 Go to previous message
Maginor is currently offline  Maginor
Messages: 44
Registered: May 2019
Member
Hi,

I have an ArrayCtrl where the rows are displayed as strings, and I have made it so that if you click the column header, it sorts them alphabetically. So far so good.
However, I want to make it so that if you click again, it restores the original order. There is no way to determine the original order by looking at the strings on their own, so I have thought of two solutions.

1. Clear the ArrayCtrl and read the data in again from the original source. Seems a little overkill.

2. Have a second column with the numbers 0..N, and sort by this column to restore the original order. However, I don't want these numbers to be displayed, and I can't find a way to hide a column.

Are there any better ways to do this?
 
Read Message
Read Message
Read Message
Previous Topic: [Bug]ArrayCtrl,MultiSelect.In WhenSel callback, selection status of last selected row is incorrect
Next Topic: Button in Array segfault
Goto Forum:
  


Current Time: Fri Mar 29 16:34:08 CET 2024

Total time taken to generate the page: 0.01072 seconds