Sub xclv_page2_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
If LastIndex > = xclv_page2.Size -1 Then 'if lazy loading reach the end of the list, then load more from the DB
Dim DR As ResultSet = Main.content_sql.ExecQuery("SELECT MAX(rowid) AS rowid FROM mytable")
Do While DR.NextRow
GetContent(DR.GetInt("rowid"))'rowid is the offset for your LIMIT offset
Loop
DR.close
End If
End Sub