ScrollView Clearing
Hi!
I'm having this kind of problem.
I have a scrollview that is populated with SQL from a table.
Following some forum (Klaus) examples, this is my sub:
sub SQLReadTable
' Reads the SQL data base
Dim i As Int
Dim Cursor1 As Cursor
Cursor1 = SQL1.ExecQuery("SELECT IdArt,DesArt,Um,QtaOrd,ImpUni from ORDINI")
Dim row(NumberOfColumns) As String
row(0)="Codice"
row(1)="Descrizione"
row(2)="Um"
row(3)="Qtà"
row(4)="Imp. Unit."
SetHeader(row)
NumberOfRows=0
For i = 0 To Cursor1.RowCount - 1
Dim row(NumberOfColumns) As String
Cursor1.Position = i
row(0)=Cursor1.GetString("IdArt")
row(1)=Cursor1.GetString("DesArt")
row(2)=Cursor1.GetString("Um")
row(3)=Cursor1.GetString("QtaOrd")
row(4)=Cursor1.GetString("ImpUni")
AddRow(Row)
Next
Cursor1.Close
End Sub
It works. But, if i add a new record in the db (using another module) when I raise Activity Resume I recall
Sub Activity_Resume
SQLReadTable
NumberOfVisibleRows=scvList.Height/RowHeight
End Sub
the new record is visible on the scroll view but not clickable!
Maybe I need to redraw the scrollview again, tried with invalidate before SQL ReadTable but no success!
If I Try
Sub Activity_Resume
ClearAll
SQLReadTable
NumberOfVisibleRows=scvList.Height/RowHeight
End Sub
Nothing seems to happen.
How can I achieve that?