How does sortrows sort the column if all the data in the column are the same?

Posted by: rakixedej on 14 March 2018, 5:32 pm EST

    • Post Options:
    • Link

    Posted 14 March 2018, 5:32 pm EST

    I have a fpspread where one column in empty [I am inserting a empty string " " ] .

    I am seeing a weird behaviour when I try to sort this empty column.

    fpSpread1.ActiveSheet.SortRows(e.Column, true, true);

    The first and last row stay as is and the rows in the middle are getting sorted with respect to the first column of the spread . This is not happening if the number of rows are less .

    For now we are giving a secondary column to the sortinfo class to avoid this , but wanted a clarification on what exactly happens when you try to sort a empty row ?

  • Posted 14 March 2018, 6:53 pm EST

    edit : but wanted a clarification on what exactly happens when you try to sort a empty column ?

    Also facing this if the column has same values

  • Posted 15 March 2018, 10:23 pm EST

    Hello,

    When the column is empty the Sort happens for blank values in ascending or descending order. Both the fpSpread1_AutoSortingColumn and fpSpread1_AutoSortedColumn events are fired.

    Since all cells contain same values the order of rows does not change and the final output remains intact.

    Thanks,

    Deepak Sharma

  • Posted 18 March 2018, 8:56 pm EST

    When I add more than 16 rows, seems like the order is weird i.e. the order gets modified w.r.t first column .

    Some times I see first and last row stay as is , but the rows in the middle are sorted based on the first column .

  • Posted 20 March 2018, 1:38 am EST

    Hello,

    Could you provide me your sample application to further debug this issue along with the steps?

    Thanks,

    Deepak Sharma

Need extra support?

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

Learn More

Forum Channels