Hi all,
I load a tableview and the items appear correctly, if I I filter the results the resulting records appear with a large space between them. The search looks at 16 columns but only two are displayed , so I set all the unused columns to not show, any help appreciated.
Thanks
Graham
I load a tableview and the items appear correctly, if I I filter the results the resulting records appear with a large space between them. The search looks at 16 columns but only two are displayed , so I set all the unused columns to not show, any help appreciated.
Thanks
Graham
B4X:
'load object tableview from user search term
Dim strsearchstring As String
Dim strItem As String
Dim k, l As Int
Dim lst As List
lst.initialize
lst.AddAll(cboSearch.Items)
For k=1 To lst.Size-1 'dont add first item
strItem=lst.Get(k)
strsearchstring= strsearchstring & " " & strItem & " like '%" &txtSearch.Text &"%' OR "
Next
l=strsearchstring.length
strsearchstring =Utils.Mid(strsearchstring,1,(l-3))
Log (strsearchstring)
strQuery = "SELECT * FROM Objects Where " & strsearchstring & " Order BY Name;"
End If
'load object tableview
DBUtils.ExecuteTableview(Main.SQL1,strQuery,Null,0,tblObjEdit)
tblObjEdit.SetColumnVisible(0,False)
tblObjEdit.SetColumnWidth(1,80)
tblObjEdit.SetColumnWidth(2,200)
For k=3 To lst.Size-1
tblObjEdit.SetColumnVisible(k,False)
Next
End Sub