multiple Sort

Posted by: hpadmasola1 on 8 September 2017, 2:24 pm EST

  • Posted 8 September 2017, 2:24 pm EST

    is it possible to sort the data based on multiple columns ? Currently, for me It only sorts the one column I click on. Any way of doing this ?


     Harish

  • Replied 8 September 2017, 2:24 pm EST

    Hello,

    To sort based on multiple columns you may use the SortInfo class to set up your own sorting. e.g.
           
    fpspread1.Activesheet.SortRows(0, sheetView.RowCount, new SortInfo() {new SortInfo(2, True), new SortInfo(4, True), new SortInfo(11, True)})
     
    That will sort all rows in the sheet, using the values in the third, fifth, and twelfth columns as the primary, secondary, and tertiary sort keys, respectively.

     

    Thanks,

Need extra support?

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

Learn More

Forum Channels