Hi everyone,
Could anybody help me how to solve the following situation ? i would like to wait until searchview is populated.
I modified searchview class - added set_text method
Pass a value to searchview and simulate click or enter in searchview
Could anybody help me how to solve the following situation ? i would like to wait until searchview is populated.
I modified searchview class - added set_text method
Pass a value to searchview and simulate click or enter in searchview
B4X:
Sub Class_Globals
Private fx As JFX
Private SV As SearchView
Private xui As XUI
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize (vatNo As String)
Main.MainTBP.LoadLayout("scr_customer","Customer Form")
CallSubDelayed(Me,"fill_SV")
If vatNo<>"" then
SV.set_text(vatNo)
SV.lv_MouseClicked
End if
End Sub
Sub fill_SV
Dim cmd As DBCommand=jRDC2Utils.CreateCommand("get_ALL_VAT_number",Array())
Wait For(jRDC2Utils.ExecuteQuery(cmd)) complete(res As DBResult)
Dim vatNoLst As List
vatNoLst.Initialize
For i=0 To res.Rows.Size-1
vatNoLst.Add(jRDC2Utils.GetColumnObject(res,i,"vatNo"))
Next
SV.SetItems(vatNoLst)
End Sub
Searchview class:
Public Sub set_text(text As String)
et.Text=text
End Sub