Question about table control

Discussion in 'Questions (Windows Mobile)' started by EzCoder, Oct 26, 2007.

  1. EzCoder

    EzCoder Member Licensed User

    First of all, let me say **Thank You!** for such a fantastic product!
    The more I use it, the better I like it. :)

    On with the question...
    I've been doing some testing of the table control, converting data from one delimited format to another (piped to tabbed, comma to piped, etc...) and ran across an oddity that I need some help with. As the example I've attached shows, I can easily sort the table on a given column and it works flawlessly. However, once the table is sorted, saving the results (Table1.SaveCSV) does not save the data as sorted in the table.

    Here's my code with some sample data tagged onto the end:
    Sub Globals
    'Declare the global variables here.

    End Sub

    Sub App_Start
       Table1.Height = 
       Table1.Width = 
       Table1.Visible = 
       Table1.Enabled = 
       Table1.Color = 
       Table1.HeaderColor = 
       Table1.LinesColor = cGold
       Table1.LoadCSV (

       AddButton (Form1, 
    "Button1"2022010030"Click Me!")
       Button1.color= Form1.Color
       AddEvent (
    "Button1", Click, "ButtonsClick")
    End Sub

    Sub ButtonsClick
    'I = Asc ("9")
    Table1.TableSort ("PartNumber ASC")
    Table1.SaveCSV (
    "exporteddata.csv"Chr(9),False)'tabbed format
    End Sub

    'Sample Data Used For Testing:
    It seems that once the table has been sorted, it would save the same way...
    Am I just missing something again?

  2. Erel

    Erel Administrator Staff Member Licensed User

    Sorting the table doesn't change the database.
    It only changes the way it appears.
    Filtering the table will also won't change the database.
    If you want to save the result you can copy the rows to a new table and then save the new table data.
  3. EzCoder

    EzCoder Member Licensed User

    Okay, thank you very much for the info!
  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