Editable table

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:
 

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.
 

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
 
Top