Closed edd-cgfan closed 1 year ago
Hi cgfan,
Your problem is well-known. The column sorting is a nasty issue, however in another way as the one you described. What you need is almost no effort. It has been "sloppy" programming by whoever created that code... The WPF data grid handles it automatically in the correct way if you give it the correct data type. I gave it a string, so it sorted as a string... I made a quick test and gave it a numerical type (double) as datatype, and this is the result from your file (thanks for it btw), with the "km_abs" column showing the correct sorting:
Then, where's the "nasty" problem? The problem is that you do not know which column is sorted, and in which way (ascending, descending). The "correct" and expected solution is to show some indication on the sorted column. The xaml provides this also, but (and this is the nasty part) only in the following way:
This really looks not nice at all. As soon as you change the default background color, i.e. the one shown here, the sorting indication is gone. It comes back only if you write a template with many lines of code. Whoever decided this at MS, ....
In any case, the correct sorting will be included in the next version. The sorting indication would be a separate issue.
BTW, this issue might affect also other tables, which I will investigate.
Regards, Clem
Should work in 4.1.1
Hi Clem,
Thanks for the new version and your efforts solving this sorting problem. It works well. I like the way how you show which column is sorted in which direction.
However, I found one thing: After the first start of the receiver and not having touched any column header: Please see the images:
At the following one it seems to be sorted right, but the the arrow for indication of the sorting isn't the right one: (After looking at the image again, I see that the sorting does not seem to be correct: 0.024 and 0.025)
Nevertheless, my suggestion: Just omit the arrow and show it only after one has clicked on the column if that is easy to implement.
Regards, cgfan
Hi cgfan,
many thanks for this quick test. The behavior was (half) intended, as that table was not considered to need a permanent update of the sorting. However, in a dynamic environment this would be at least confusing.
Therefore, I put an updated new version 4.1.2 into the "Download" which should fix this. I also considered your comment about showing the sorting triangle only after first user action.
The "History" page got a remark about the new version, nothing else.
Clem
Hello Clem,
Thanks for 4.1.2. Table sorting looks very good now: Works perfectly.
Regards, cgfan
Thanks for feedback. I close this.
Clem
Hi Clem,
By chance, under special DX conditions, I wanted to know how to sort each transmitter site by distance:
What one would expect is this for the ascending case:
This is another sorting problem: It is the km column of the TII tab. It is not an issue of QIRX, it is an issue of the control (WPF DataGrid?) because the default sorting algorithm of the control doesn't sort numerically.
Here is a link to a raw file containing this case: 10B-rbb-raw-file
You can check it if you change the OwnPosition line in the qirx4.config file to:
<OwnPosition Latitude="52.131489" Longitude="11.633654" />
Maybe you can think about a custom sorting for the km columns when you work on the other sorting problem (#102).
Regards, cgfan