hello every one ...
I'm trying pagination with SQLite database using live binding with a tlistview i did try using this guide:
DB Pagination and TListView question - Databases - Delphi-PRAXiS [en] (delphipraxis.net)
with some modification so i added the implement of pagination on PullToRefresh of the tlistview and work's fine .
the problem that .... i want to keep the items that added to the tlistview every PullToRefresh and so on
the code I used, can anyone point me to the right direction.
procedure TFormMain.ListView2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Single);
begin
if PullToRefreshCheck then
begin
if (Y-RefreshPos)>40 then begin
if (FDTableTask.RecordCount < lMyMaxRecordsByPage) then
exit;
//
FDTableTask.Disconnect;
FDTableTask.FetchOptions.RecsSkip := FDTableTask.FetchOptions.RecsSkip + lMyMaxRecordsByPage;
FDTableTask.Open();
Label48.Text := '...تحديث';
Label48.Visible := True;
Timer3.Enabled := True;
PullToRefreshCheck := False;
RefreshPos := 0;
end else begin
Label48.Text := 'u retched the end ';
end;
end;
bandicam_2023-01-22_20-18-24-671_(1).mp4