Regarding datagridview sorting

sena

New member
Joined
Sep 3, 2024
Messages
1
Programming Experience
Beginner
263.039597368387
294.510219439952
328.064936852312
0.74379745352141
30.0812803180931
56.6802931778778
83.0395973683867
114.510219439952
148.064936852312
180.743797453521
210.081280318093
236.680293177878
79.0392434414144
307.048474657498
51.6834531306868
70.8773154106203
258.958160103576
48.079110237117
343.430924439679
168.815521446476
348.815521446476

Im having above one column 19 row values i need to sort them in ascending order by reference to the first row as starting point like below


263.039597368387
294.510219439952
307.048474657498
328.064936852312
343.430924439679
348.815521446476
0.74379745352141
30.0812803180931
48.079110237117
51.6834531306868
56.6802931778778
70.8773154106203
79.0392434414144
83.0395973683867
114.510219439952
148.064936852312
168.815521446476
180.743797453521
210.081280318093
236.680293177878
258.958160103576

How to achieve this sorting someone help this

Thanks in advance
 
Solution
The sort order order appears to be:
  • Take first value (263.039) and any value greater and sort numerically as a group (remove/exclude these from following sorting)
  • In remaining, likewise take first value (0.74) and any value greater and sort numerically as a group
  • and so on (the first two passes has taken all values here)

Possibly a 'sortgroup' column could be added, after mapping groups, sort by sortgroup then by value.
The sort order order appears to be:
  • Take first value (263.039) and any value greater and sort numerically as a group (remove/exclude these from following sorting)
  • In remaining, likewise take first value (0.74) and any value greater and sort numerically as a group
  • and so on (the first two passes has taken all values here)

Possibly a 'sortgroup' column could be added, after mapping groups, sort by sortgroup then by value.
 
Solution
Back
Top