Sub GridPanel_Touch (Action As Int, X As Float, Y As Float) As Boolean
'DATAGRID SUB ROUTINE(11)
'Get the Cell co-ordinates
If Action <> Activity.ACTION_DOWN Then Return True '!!!!!!!!!!!!!!!!!!
Dim Temp As Int
Temp = EqptCursor.Position
If EditText1.Visible Then EditText1_EnterPressed 'Take care of any outstanding edits before proceeding
Edittext1.Text=""
'get cell left
Dim Count As Int
For Count = 0 To 13
If X > ColLine(Count) Then
CellLeft = ColLine(Count)
CellWidth = ColLine(Count+1)-ColLine(Count)
ColNo = Count
Else
Exit
End If
Next
Dim Temp As Int
'get cell top
For count=1 To (GRID_ROWS + 1) 'RowHeaders plus total GRID_ROWS
If Y > (gridFieldHeight * count) Then
Celltop = gridFieldHeight * count
RowNo = Count - 1
eqptCursor.Position = Topline + Rowno
Else
Exit
End If
Next
If CellLeft > 1 Then
Gridedit
Else
deleteTimer.Enabled = True
End If
Return True
End Sub
Sub DeleteTimer_Tick
deleteTimer.Enabled = False
DeleteLine
End Sub
Sub DeleteLine
'DATAGRID SUB ROUTINE(12)
'Delete a datagrid data record
'Shade selected row
...