iOS Question Tableview Refresh

AtillaBilgic

Member
Licensed User
Longtime User
I am trying refresh tableview when Pressing a button . But not refresh,
Please help,

-------------------------------------------------------------------------------------------------------
Sub Button1_Click
Dim ServerUrl As String= "http://www.xxx.com/xxxServices.aspx"
Try
job1.Initialize( "Job1")
Dim request As HttpRequest
request.InitializeGet(ServerUrl)
request.Timeout = 10000 'set timeout to 10 seconds
job1.Execute(request, 1)
Catch
Msgbox("error !","xxx.net")
End Try
End Sub
Sub job1_ResponseSuccess (Response As HttpResponse, TaskId As Int)
' TableView1.Clear
Dim parser As JSONParser
parser.Initialize(Response.GetString )
rows = parser.NextArray
pg.RootPanel.RemoveAllViews
pg.RootPanel.LoadLayout("Araclar")
pg.RootPanel.AddView(TableView1,0,0,100%x,100%y)

If rows.Size > 0 Then
For i = 0 To rows.Size-1
Dim m As Map
m = rows.Get(i)
' Dim aracId As Int=m.Get("Id")
Dim LastState As String=m.Get("LastState")
Dim plakano As String=m.Get("PlakaNo")
Dim Hiz As String= m.Get("Speed")

Dim Linestr As String=plakano & " " & Hiz & " km/s"
Dim obj As AttributedString
obj.Initialize(Linestr,Font.DEFAULT_ITALIC, Colors.Black)
Dim tc As TableCell = TableView1.AddSingleLine(Linestr )
tc.Text = obj
tc.Update
Next
Else
Msgbox("not found !","xxx.net")
End If
 
Top