I am pulling data from remote DB and Passing them into xCustomListView. I am able to Pass the 1st field from the remote DB to the 1st field on xCustomListView. How do I get remaining 2 Fields (AmtPiad and Oustanding on the listView.
B4X:
Private Sub Createitem(lv1 As String,iv As itemValue) As B4XView
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0,0,0,100%x, 90dip)
p.LoadLayout("pmtItemLayout")
txtCarNumber.Text = lv1
Return p
End Sub
Sub GetAllPayments
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("SelectAllPayments", Null)
Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
req.HandleJobAsync(j, "req")
Wait For (req) req_Result(res As DBResult)
'work with result
Log(res.Columns)
'Log(res.Rows)
'spnCarNumber.Clear
For Each row() As Object In res.Rows
'Passing CarNumber Value to CreateItem
Dim iv As itemValue
iv.Initialize
iv = row(res.Columns.Get("CarNumber"))
CLV.Add(Createitem(iv,iv),iv)
'Want to Pass remaing Fields to CreateItem and show on pmtItemLayout
AmtPiad = row(res.Columns.Get("AmtPiad"))
Oustanding = row(res.Columns.Get("Oustanding"))
Log("Payment Details:" & imgLocation & ":" & iv & ":" & AmtPiad & ":" & ":" & Oustanding)
Next
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
End Sub