Hi all,
How can I invest the listview list?
I add information as below:
Thanks
EDIT: I add information in a DB SQLite and show it in listview1
The information is in order: first to last information added..
I will like to invest the order in listview: show last information to first information added
How can I invest the listview list?
B4X:
'show ListView1
Dim Cursor1 As Cursor
Dim string1, string2 As String
Cursor1 = SQL1.ExecQuery("SELECT ID, email, total FROM QR")
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
T_Index = Cursor1.GetInt("ID")
string1 = Cursor1.GetString("total")
string2 = Cursor1.GetString("email")
ListView1.AddSingleLine2( string1 & " -- " & string2 & " -- ", T_Index)
Next
Cursor1.Close
I add information as below:
B4X:
Sub AddNew
SQL1.ExecNonQuery2("INSERT INTO QR VALUES(Null, ?, ?)", Array As Object( 1, Label1.Text))
End Sub
Thanks
EDIT: I add information in a DB SQLite and show it in listview1
The information is in order: first to last information added..
I will like to invest the order in listview: show last information to first information added
Last edited: