Specifying an IComparer for use with AllowAutoSort

Posted by: krisg1984 on 8 September 2017, 12:30 pm EST

  • Posted 8 September 2017, 12:30 pm EST

    Hi, I have a spread with rows of CheckBoxCellTypes and then three frozen TextCellTypes that show show info about the column (total checked, etc.).
    I want to be able to sort the columns using AllowAutoSort but be able to ignore the bottom three frozen rows from the sort process.
    Is there anyway to make the farpoint spread refer to an IComparer when it performs its auto sort so I can handle the sort exceptions?
    I know this would be easy if I didn't use the AllowAutoSort and just manually sorted on left click of the column headers, but I would prefer to not have to manage the sort state, indicator icons, etc. and also I may want to enable the AllowAutoFilter in the future.

    Thanks
    Kris
  • Replied 8 September 2017, 12:30 pm EST

    Kris,


    There is not a way to provide an IComparer to the auto sorting. However, I would suggest catching the AutoSortingColumn event and cancel the event and put your sort code in this event.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels