Hi All,
I want to implement lazy loading into my mobile application,
I am fetching data through a server call which returns a list of records from aggregate.
I am using on scroll ending, how can i fetch the number of records(e.g. 20), each time i scroll the list int he incremental format.
Is there any query?
Thanks,
DM
Hi Dhiraj,
Use a list variable to bind to the widget instead of using the SQL return list directly.
Then, you can use
OFFSET @Skip ROWS FETCH NEXT @Take ROWS ONLY
at the end of your SQL query, where @Skip is the number of records currently in your list variable and @Take is the number of new records you want to fetch.
So in the on lazy load action you will call the SQL, then append the returned records to the list variable.
Peter L wrote:
Thanks Peter; i used the same :)
and it worked.
Regards,
Dhiraj M.
Hi Dheeraj,
You need to set max record 20 , when you scrolled it will populate 20 records.
see below image
Regards
Rahul Sahu
Rahul Sahu wrote:
Hi Rahul,
Thanks for quick response;
You got me wrong i think; let me be more clear
I am not asking about widget, i am asking for Aggregate or SQL query, how can i set the row count as 20 and for the next load it should get next 20 records i.e. 40 in the incremental format each time i scroll.
Thanks.