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
550
Problem sorting image column in WinGrid
posted

Hi,

     I have an image column in a WinGrid where i show an X image for rejected and tick image for accepted rows. However since these are image columns it does not by default sort. I want to make this column sort on the basis of the column image. Please suggest possible ways to achieve this.

Cheers,

SK

Parents
  • 69832
    Suggested Answer
    Offline posted

    You would have to assign a custom IComparer implementation to the column's SortComparer property. It is not a very intimidating interface (there is only one method to implement); what you could do is use whatever criteria you are using to decide which image to display, and return 1 for one of those conditions and -1 for the other, depending on which rows you want to be closest to the top.

Reply Children