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
83
Manually set Sort Glyph
posted
Hi, I created a detailed ListView with two Columns, one of these columns is invisible. I do some changes on the values before I add them to the visible column. The original value was added into the hidden column. When I sort the visible column, I catch the Sorting Event and programmtically sort the hiddencolumn. Now there a two questions: 1st) How can I set the SortGlyph (the littel arrows) on the visible column manually, because after sorting by the hidden column there are not visible any more. 2nd) Is there a better way to do this work? I am not very happy with the hidden column. Thanks a lot!
Parents
No Data
Reply
  • 2334
    posted
    You could try setting the SortComparer of the MainColumn to a custom IComparer that sorts based on the hidden values. This way the ListView will add the sort glyph to the main column but the values will be sorted based on hidden values.
Children