You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is one-column sort support.
Which is ok, but there are several situtations where more than one-column sort is needed.
Googling for alternative returns one solution, but unfortunately it is not working like it suppose to.
I have implemented built-in native multi-column sort soluton to version 5.4.1.
It adds/extends design-time and run-time ability to sort selected columns in pre/post build time.
There is possibility to add/decrese number of sorted columns or rearange order in run-time.
Major changes are:
added Header.SortColumn = -2 value - it means multi-sorted,
deleted Columns[n].DefaultSortDirection,
added Columns[n].SortDirection,
added Columns[n].SortEnabled - on/off sort of column,
added Columns[n].SortOrder = -1 - not sorted at design-time or > -1 - sort index (0 - first, 1 - second, 2 - third,...)
Hi, it was 7 years ago, when I did this mod, but You are lucky that I have backup of this archive. VirtualTrees541mod.zip vt541_changes.zip
In file vt541_changes.rtf is summary of all changes that I did to this mod. Bold text represents what is added/modified by me.
There is no need for this in my mod, because there is property TVirtualTreeColumn.SortEnabled, which is doing exactly what this sdNone would do. And even more, You do not loose last used sort direction for the column if You do it by using two properties.
Ok, I think that I added this properties to TVirtualTreeColumn because TVTHeader includes SortColumn and SortDirection properties, so to be able to sort multiple columns, You need to have this properties for each column, not for whole header only. but to be backward compatilble You need to have both.
Activity
vincentparrett commentedon Jan 21, 2015
From joachim....@gmail.com on June 24, 2014 14:10:10
One usually implements the OnCompare event to achieve multi column sorting. I'm not sure if this enhancement is of general interest.
In case there is a method you need virtual protected to apply this enhancement in your own derived clas, and it is not virtual protected, let us know.
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low
vincentparrett commentedon Jan 21, 2015
From gmnev...@gmail.com on June 26, 2014 02:12:18
This is what I get from my enhancement (see picture).
I'm not sure if this can be achieved by making a descendant class derived from vts.
Attachment: vts_multi_column_sort.jpg
vincentparrett commentedon Jan 21, 2015
From fr0st.br...@gmail.com on November 18, 2014 03:46:22
Amazing for complex grid-like cases. IMHO worths to be included in the source, at least as demo or special derived class.
ruslancnua commentedon Apr 21, 2021
Hello. can i have a code VirtualTrees541mod.zip?
gmnevton commentedon Apr 22, 2021
Hi, it was 7 years ago, when I did this mod, but You are lucky that I have backup of this archive.
VirtualTrees541mod.zip
vt541_changes.zip
In file vt541_changes.rtf is summary of all changes that I did to this mod. Bold text represents what is added/modified by me.
ruslancnua commentedon Apr 22, 2021
thanks
MHumm commentedon Apr 27, 2021
Here's some new entry which might be related to this one: #1037
gmnevton commentedon Apr 28, 2021
There is no need for this in my mod, because there is property TVirtualTreeColumn.SortEnabled, which is doing exactly what this sdNone would do. And even more, You do not loose last used sort direction for the column if You do it by using two properties.
MHumm commentedon Apr 28, 2021
Ok, I didn't knew TVirtualTreeColumn.SortEnabled yet. In which version is this? I still have 7.2 installed and cannot find it there.
gmnevton commentedon Apr 28, 2021
v5.4.1, maybe it was dropped somewhere along the road, I will look into latest sources and compare this.
gmnevton commentedon Apr 28, 2021
Ok, I think that I added this properties to TVirtualTreeColumn because TVTHeader includes SortColumn and SortDirection properties, so to be able to sort multiple columns, You need to have this properties for each column, not for whole header only. but to be backward compatilble You need to have both.