Sort columns or rows by column or row

Posted by: kbj on 5 April 2018, 3:01 am EST

    • Post Options:
    • Link

    Posted 5 April 2018, 3:01 am EST

    This is probably an enhancement request to:

    be able to sort columns or rows using an icomparer of the column or row object. There are cases when the item I wish to sort by is something not stored in a cell., but stored in the column/row tag or a value in the row/column header. I’d like to sheetView.SortColumns(new iComparerOfColumns).

    -Thanks

  • Posted 10 April 2018, 2:50 pm EST

    Hello,

    You can sort by any property, that does not have to be specially stored in cell. For this, you may create a class named Extension and define a method named SortRowsByProperty.

    Please find attached sample application where we have implemented to sort Rows based on a Property ‘Tag’. You can extend this by passing a Comparer object in OrderBy method for more complex objects.

    Hope it helps.

    Thanks,

    Ruchir Agarwal

    CustomComparer.zip

Need extra support?

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

Learn More

Forum Channels