MULTI-LEVEL SORTING IN FARPOINT

Posted by: sourav-agarawal on 8 September 2017, 1:57 pm EST

  • Posted 8 September 2017, 1:57 pm EST

    Does FARPOINT have any Limitation in performing multi-level sort?


    According to my knowledge, FARPOINT default sorting allows upto a max of 2 levels Multi-sort.


    Kindly respond...Smile

  • Replied 8 September 2017, 1:57 pm EST

    Yes u r right. Farpoint has some limitations multilevel sort is one of these.


    farpoint support upto max 2 level of sort.


     

  • Replied 8 September 2017, 1:57 pm EST

    If you are asking about multi key sorting you CAN do this in Spread and have as many levels as you wish. For instance,


     


    Dim si() As FarPoint.Win.Spread.SortInfo = {New FarPoint.Win.Spread.SortInfo(0, True), New FarPoint.Win.Spread.SortInfo(1, False), New FarPoint.Win.Spread.SortInfo(2, True)}


     


    FpSpread1.ActiveSheet.SortRows(0, 16, si)


     


    This code will sort the first 16 rows in the first 3 columns. Matching values in the A column will be sorted in descending order based on values in the B column and if values in the B column match they will be sorted in ascending order based on values in the C column.


     


     

  • Replied 8 September 2017, 1:57 pm EST

    This does not seem to work for me.  I have this code:

     

     Dim si() As FarPoint.Win.Spread.SortInfo = New FarPoint.Win.Spread.SortInfo() {New FarPoint.Win.Spread.SortInfo(0, False), New FarPoint.Win.Spread.SortInfo(5, False)}

        grdHistory.Sheets(0).SortRows(0, grdHistory.Sheets(0).RowCount, si)

     

    Seems like it should sort by column 0 first, the order date, then column 5, the ticket number.  However it seems to just ignore and sort by column 0.  And only shows the sort indicator on col. 0.

    Note that col. 4 is hidden, ticket # is col 5.

     414835 and 2 are not sorting right.  Ticket number is in the value.

     

     

    shot of sorting issue 

     

     

  • Replied 8 September 2017, 1:57 pm EST

    Hello,


    We are unable to replicate the issue at out end using spread's version 4.0.3512.2008 as on setting the sortInfo array, we are able to specify multiple criteria for sorting the data.


    Please find attached sample for the same and put values in spread and press button1 to sort them on the basis of sortInfo array . However, after sorting hide the 1st column by pressing button2, then also you will be able to see correct sorted data.


    As far as SortIndicator is concerned, are you setting it using the SortIndicator property of Column set to descending because on sorting data using sortInfo, we never get the sortIndicator.


    Please share your observations regarding the same and also let us know which version of fpSpread are you using? And if possible please attach a zipped sample replicating the issue for us to debug.


    Hope the attached sample will help. Thanks.


    2010/02/sortInfo-Level.zip
Need extra support?

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

Learn More

Forum Channels