table colwdith doesn't work at device

Discussion in 'Questions (Windows Mobile)' started by pochero, Nov 14, 2008.

  1. pochero

    pochero Member Licensed User

    table.ColWidth doesn't work at my device. It works ok at desktop with the same code. Is this a known issue?
    windows mobile 6.1
    net compact framework 2.0

    Thank you and sorry for my english
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    It should work fine on the device.
    Can you post an example?
     
  3. pochero

    pochero Member Licensed User

    The problem is when I use "table1.LoadXML". It works well from the basic4ppc interface. It does not work if I compile for Windows or for the device.

    Code:
    Sub Globals
       
    'Declare the global variables here.
       Dim size(7)
       size() = 
    Array (5,10,15,20,40,80,120)
    End Sub

    Sub App_Start
       AddTable (
    "Form1""table1"00240130)
       table1.LoadXML (AppPath & 
    "\" & "data.xml")
       
       
    For i=0 To ArrayLen (size())-1
          
    'table1.AddCol (cString, i, 1)
          table1.ColWidth(table1.ColName(i)) = size(i)
       
    Next

       Form1.Show
       
       
    'table1.SaveXML (AppPath & "\" & "data.xml")
    End Sub
    rename data.txt as data.xml
    Thank you
     

    Attached Files:

    • data.txt
      File size:
      787 bytes
      Views:
      48
  4. Erel

    Erel Administrator Staff Member Licensed User

    I see this behavior too. There seems to be a difference between the way different versions of .Net Framework handle tables loaded with LoadXML. You can use the legacy compiler instead of the optimized compiler and it should work properly.
    However I recommend you to switch to LoadCSV / SaveCSV. It is faster and more reliable.
     
  5. pochero

    pochero Member Licensed User

    Thank you
     
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