Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Restore original row order
Restore original row order [message #52256] |
Mon, 19 August 2019 11:33  |
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?
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 12:15:04 CEST 2025
Total time taken to generate the page: 0.00362 seconds
|