TableSort, there's a way to remove a Sort in a table?

Discussion in 'Questions (Windows Mobile)' started by ghale, Jul 29, 2009.

  1. ghale

    ghale Active Member Licensed User

    Hello,
    I've read on some posts that a TableSort is forever (like diamonds).
    There's a way to remove it, so the data can be displayed according to the order of the file?


    To solve this on a data with has been sorted with TableSort
    • I've used SaveCSV to dump data
    • then I've used Dispose method on table
    • then I've used AddTable to recreate it
    • then I've used LoadCSV to repopulate it
    It's too stupid or can be a way to do this?

    Thanks,
    ghale
     
    Last edited: Jul 29, 2009
  2. specci48

    specci48 Well-Known Member Licensed User

    Hello ghale,

    sorry but you have to clear the table and to load the file into the table again to get the "original" order of the rows... :(



    specci48
     
    Last edited: Jul 29, 2009
  3. ghale

    ghale Active Member Licensed User

    So the way I've used (see #1) is valid?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You can use:
    Code:
    table1.TableSort("")
    It will remove the sort.
     
  5. ghale

    ghale Active Member Licensed User

    I've tried this, but without success!!
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    The following code seems to work just fine:
    Code:
    Sub App_Start
        Form1.Show
        table1.AddCol(cNumber, 
    "c1"100)
        table1.LoadCSV(
    "1,csv"","TrueFalse)
        
    Msgbox("before sort")
        table1.TableSort(
    "c1")
        
    Msgbox("after sort")
        table1.TableSort(
    "")
        
    Msgbox("sort cleared")
    End Sub
     
  7. ghale

    ghale Active Member Licensed User

    I'll assure you that yersterday evening THIS CODE doesn't work on my mobile!!
    Now it works.

    So, I think that in my code there was something other that don't let me "unsort" the table contents.
    So I've used the #1 post solution.

    :sign0161:
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice