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

  • Posted 8 September 2017, 2:13 pm EST

    When I click on the column heading, the data gets sorted which is fine. But it also sorts the grand totals row at the bottom. I want the sort to leave the totals row at the bottom alone. Is there a easy way of doing this ?



  • Replied 8 September 2017, 2:13 pm EST

    Heelo Harish,

    You can try setting FrozenTrailingRowCount to 1 which gets or sets the number of non-scrolling rows on the trailing edge of this sheet. It freezes the last n rows.


    fpSpread1.Sheets[0].FrozenTrailingRowCount = 1;


    Hope this will help you. Thanks.

  • Replied 8 September 2017, 2:13 pm EST


    This is working but If I have only two rows displaying, It sticks the totals row all the way at the bottom of the grid. I want it to show right after the two rows. I dont want any gap there.

    Appreciate your insight on this..


  • Replied 8 September 2017, 2:13 pm EST

    Hello Harish,

    You first need to cancel AutoSortingColumn event and then need to write your own Sorting algorithm to SortRows except the last row.

    Please find the attached sample for the same.


Need extra support?

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

Learn More

Forum Channels