Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
TStringGrid ColumnClickSort - how to 'unsort' ?
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Best practice memory mana...
by
ASerge
[
Today
at 11:23:07 pm]
Change the form name issu...
by
JuhaManninen
[
Today
at 11:17:13 pm]
Having issues with Lazaru...
by
hamacker
[
Today
at 11:09:44 pm]
Converting a string/index...
by
1HuntnMan
[
Today
at 11:05:18 pm]
dbtext doesn't change val...
by
rvk
[
Today
at 10:36:38 pm]
WRITE_EXTERNEL_STORAGE Fa...
by
Guser979
[
Today
at 10:12:06 pm]
MSEide+MSEgui new release...
by
Fred vS
[
Today
at 10:08:03 pm]
recover old look
by
Paolo
[
Today
at 10:07:37 pm]
FpDebug unexpected Assemb...
by
440bx
[
Today
at 09:59:54 pm]
TBGRABitmap.TextSize retu...
by
circular
[
Today
at 09:45:47 pm]
How can I draw a rectangl...
by
Handoko
[
Today
at 07:49:27 pm]
OPC client with Lazarus
by
mrogerf
[
Today
at 07:17:10 pm]
TODBCConnection without O...
by
kedat
[
Today
at 07:11:18 pm]
Insert text into a Richme...
by
rcmz
[
Today
at 07:04:54 pm]
search and replace richme...
by
rcmz
[
Today
at 06:43:55 pm]
Poll: Watches and Display...
by
440bx
[
Today
at 06:20:50 pm]
Changes in form/datamodul...
by
af0815
[
Today
at 06:03:10 pm]
How to declare uninitiali...
by
Thaddy
[
Today
at 04:55:52 pm]
Save form contents to fil...
by
gjunk
[
Today
at 04:42:24 pm]
Random values of Extended...
by
fiscraliger
[
Today
at 04:10:57 pm]
How can I control "main m...
by
Gebo
[
Today
at 03:38:31 pm]
Ho Ho Ho IntraWeb in Laza...
by
wfbhappy
[
Today
at 03:32:34 pm]
Have anyone know how to t...
by
dseligo
[
Today
at 03:12:47 pm]
Question about OOP : hidi...
by
Joanna
[
Today
at 03:04:13 pm]
Component and GPL
by
ginoo
[
Today
at 01:59:49 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: TStringGrid ColumnClickSort - how to 'unsort' ? (Read 2341 times)
FrankBKK
New Member
Posts: 31
TStringGrid ColumnClickSort - how to 'unsort' ?
«
on:
June 15, 2021, 09:33:23 am »
TStringGrid allows to change the sorting of a column via ColumnClickSort when clicking on the Header, click again to switch Asc/Desc sort order.
How can I get back the original, unsorted view ?
Logged
Zvoni
Hero Member
Posts: 2325
Re: TStringGrid ColumnClickSort - how to 'unsort' ?
«
Reply #1 on:
June 15, 2021, 09:42:11 am »
You can't.
Except if you saved the "original" sort somewhere
Logged
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
FrankBKK
New Member
Posts: 31
Re: TStringGrid ColumnClickSort - how to 'unsort' ?
«
Reply #2 on:
June 15, 2021, 07:24:13 pm »
Thanks for the quick reply - that's bad though ....
What is the best approach to circumvent this ?
A secondary backup grid to restore the original sort order seems like overkill and to add an add. sort column is something I try to avoid - are there any other options ?
Logged
Awkward
Full Member
Posts: 135
Re: TStringGrid ColumnClickSort - how to 'unsort' ?
«
Reply #3 on:
June 15, 2021, 07:39:20 pm »
why not to add hidden column with numbers for original order and sort by it when needs?
Logged
Zvoni
Hero Member
Posts: 2325
Re: TStringGrid ColumnClickSort - how to 'unsort' ?
«
Reply #4 on:
June 15, 2021, 09:56:57 pm »
IIRC, the row-Property (or was it rows?) is of type TStrings, so a TStringList could/should work
Logged
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
LCL
»
TStringGrid ColumnClickSort - how to 'unsort' ?
TinyPortal
© 2005-2018