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
1110
Sorting on different column in WinGrid
posted

I have an UltraWinGrid that contains a column with a Bitmap in it. I would like to perform a sort on this column.

What is the best way to do this? I have an other (hidden) column available with "sortable" data in it (like 1,2,3, etc) so is it possible to sort on this, other, colum?

Do I need to write an IComparer for this? I tried this but the parameters for this are of course the UltraGridCells that need to be sorted and these are related to the clicked column.

Thanks

- Erik 

Parents
  • 45049
    Verified Answer
    posted

    Erik,

    Erik Peschier said:
    Do I need to write an IComparer for this?

    That's correct.

    Erik Peschier said:
    ... the parameters for this are of course the UltraGridCells that need to be sorted and these are related to the clicked column.

    That's also correct.  Each time the comparer is called, you'll get a reference each UltraGridCell that corresponds to a specific image.  From each UltraGridCell instance, you can get a reference to the row, from which you can then access the data stored in your "sortable" column.  You'd then have your IComparer return the result of comparing the results of your "sortable" data.

Reply Children
No Data