It is quite a big app so I have copied the relevant bits...Hope this helps!
This is the sub where the table is created:
Sub buildScoreSheet
Dim nocols As Int
nocols = Main.arrPerEnd +3
Log("nocols " & nocols)
tblScore.Initialize(Me, "tblscore", nocols,1,False)
tblScore.AddToActivity(pl1, 0, 0dip, 100%x, 100%y)
Select Case nocols
Case 9
tblScore.SetHeader(Array As String("", "", "", "", "", "", "","Tot", "Running"))
tblScore.SetColumnsWidths(Array As Int(11%x, 11%x, 11%x, 11%x,11%x,11%x, 2%x, 12%x, 19%x))
Case 8
tblScore.SetHeader(Array As String("", "", "", "", "", "","Tot", "Running"))
tblScore.SetColumnsWidths(Array As Int(12%x, 12%x, 12%x,12%x,12%x, 2%x,14%x, 20%x))
Case 6
tblScore.SetHeader(Array As String("", "", "", "","Tot", "Running"))
tblScore.SetColumnsWidths(Array As Int(17%x, 17%x,17%x, 4%x, 18%x, 22%x))
End Select
tblScore.ClearAll
noArrowsScored =0
noArrowsScoredThisEnd =0
DistanceNo = 0
endNo = 0
endScore=0
roundScore = 0
End Sub
And this is the sub that adds the rows
Sub addtosheet(Mark As String, score As Int)
Dim strScore As String
strScore= score
endScore = endScore + score
roundScore = roundScore + score
currentRow = endNo + DistanceNo
If noArrowsScoredThisEnd =0 Then
Select Case Main.arrperend
Case 6
tblScore.AddRow(Array As String(Mark,"","","","","","",strScore,""))
Case 5
tblScore.AddRow(Array As String(Mark,"","","","","",strScore,""))
Case 3
tblScore.AddRow(Array As String(Mark,"","","",strScore,""))
End Select
tblScore.jumptoRow(currentRow)
'tblScore.RowColor2((currentRow) =Colors.LightGray
Else If noArrowsScoredThisEnd = Main.arrPerEnd Then
noArrowsScoredThisEnd = noArrowsScoredThisEnd - 1
Else
Select Case Main.arrPerEnd
Case 6
tblScore.SetValue(noArrowsScoredThisEnd, currentRow,Mark)
tblScore.SetValue(7, currentRow,endScore)
tblScore.SetValue(8, currentRow,roundScore)
Case 5
tblScore.SetValue(noArrowsScoredThisEnd, currentRow,Mark)
tblScore.SetValue(6, currentRow,endScore)
tblScore.SetValue(7, currentRow,roundScore)
Case 3
tblScore.SetValue(noArrowsScoredThisEnd, currentRow,Mark)
tblScore.SetValue(4, currentRow,endScore)
tblScore.SetValue(5, currentRow,roundScore)
End Select
End If
noArrowsScoredThisEnd = noArrowsScoredThisEnd + 1
If noArrowsScoredThisEnd = Main.arrPerEnd Then
btnCancel.Visible=True
btnEnter.visible=True
End If
End Sub