Editable table

Discussion in 'Questions (Windows Mobile)' started by davelew1s, Jun 17, 2008.

  1. davelew1s

    davelew1s Active Member Licensed User

    Hi!
    This is a simplified part of my program.. when I run this code using Door.dll it puts an extra row into the table which when clicked says 'Null'....is this correct and if so what's it for?
    The table edits ok but this 'Null' causes an error in my code.

    Sub Globals
    'Declare the global variables here.

    End Sub

    Sub App_Start
    Form1.Show
    Table1.AddCol(cNumber,"Col 1",80,false)
    objTable1.New1(false)
    objTable1.FromControl("Table1")
    objTable1.SetProperty("ReadOnly",false)
    Table1.AddRow(1234)
    End Sub

    I've search the Forum but nothing turned up...any help...thanks Dave:sign0085:
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload some code that demonstrates this error?
     
  3. davelew1s

    davelew1s Active Member Licensed User

    Hi Erel!
    The code is in my first post.
    Dave.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    But what error do you get?
     
  5. agraham

    agraham Expert Licensed User

    A partial copy of some source code is in the post but not the object definitions etc. It is usually easier to diagnose these things if given a full .sbp source file that can be executed to demonstrate the problem. The problem might be somewhere other than where you have assumed and you may have missed the vital bit of data by just posting a fragment of the app.
     
  6. davelew1s

    davelew1s Active Member Licensed User

    Hi!
    The error is created by my code all the cells will change ok ...click on 1 change enter,2 change enter.....5 change enter gives the error when the extra row is highlighted....I might be able to get round this, but wondered why the extra row is there?
    Thanks Dave.



    Sub Globals
    'Declare the global variables here.

    End Sub

    Sub App_Start
    Form1.Show
    Table1.AddCol(cNumber,"Col 1",80,false)
    objTable1.New1(false)
    objTable1.FromControl("Table1")
    objTable1.SetProperty("ReadOnly",false)
    For i = 1 To 5
    Table1.AddRow(i)
    Next
    End Sub


    Sub Table1_SelectionChanged (ColName, Row)
    For i = 0 To Table1.RowCount -1
    total = total + Table1.Cell(ColName,Row)
    Next
    TextBox1.Text = total
    total = 0
    End Sub
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Editable tables have an extra row to allow the user to add new rows.
     
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