Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
364
Absolute value sorting
posted

What is the easiest way to do absolute value sort for numeric columns when the user presses the column header?

 

Thanks in advance

Nish

 

Parents
No Data
Reply
  • 469350
    Offline posted

     Hi Nish,

    You could do this using a SortComparer. You would create class that implement IComparer and then implement the Compare method. The x and y values passed in to the method will be two cells and you just get the values of the cells and get the absolute value and call compare on those values.

Children