error with table1.SelectCell

Discussion in 'Questions (Windows Mobile)' started by schimanski, Oct 28, 2009.

  1. schimanski

    schimanski Well-Known Member Licensed User

    I have a problem with saving then last used index of my table-control:

    I save the last used index of the table1 in an ini-file with

    Code:
    FileWrite(c1,table1.SelectedRow)     'dataindex
    With a new start of the application, the table should show the last index, which was in use. I load the table with

    Code:
    If FileExist("Datenbank.xml")=True Then table1.LoadXML("Datenbank.xml")
    and want to show the last index (dataindex) with:

    Code:
    table1.TableSort ("Modul ASC")
    table1.SelectCell(
    "Modul",dataindex)
    But I always get this error message:
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    I'm not sure what the error message say. However please try to use LoadCSV instead of LoadXML.
    You can convert the XML file to a CSV file by loading it and then saving the table with SaveCSV.
    CSV files are smaller and faster.
     
  3. agraham

    agraham Expert Licensed User

    I think this is happening because you are trying to set up the Table in App_Start before you have Shown the form containing it. As the Form is only built when it is first Shown the Table can't select a cell because the Table itself does not yet exist as it is only built when the Form is built.
     
    Last edited: Oct 31, 2009
  4. schimanski

    schimanski Well-Known Member Licensed User

    Thanks, agraham. That was the mistake.....:)

    m.f.G.
     
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