Jump to content

uniDBGrid:How to turn to next page?


55143681

Recommended Posts

19 hours ago, 55143681 said:

How to turn to the next page or the prior page with code?

Hello,

One possible solution:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  with UniDBGrid1 do
    if WebOptions.Paged then
      JSInterface.JSCall('pagingBar.movePrevious', []);

end;

procedure TMainForm.UniButton2Click(Sender: TObject);
begin
  with UniDBGrid1 do
    if WebOptions.Paged then
      JSInterface.JSCall('pagingBar.moveNext', []);
end;

 

  • Like 2
Link to comment
Share on other sites

On 12/6/2021 at 1:06 PM, Sherzod said:

Hello,

One possible solution:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  with UniDBGrid1 do
    if WebOptions.Paged then
      JSInterface.JSCall('pagingBar.movePrevious', []);

end;

procedure TMainForm.UniButton2Click(Sender: TObject);
begin
  with UniDBGrid1 do
    if WebOptions.Paged then
      JSInterface.JSCall('pagingBar.moveNext', []);
end;

 

Thank you very much。

C  Code is Here:

1)下一页

void __fastcall TUniFormUser::UniBitBtn10Click(TObject *Sender)

{

if(UniDBGrid1->WebOptions->Paged)

         {

         UniDBGrid1->JSInterface->JSCall("pagingBar.moveNext", "[]");

         }

}

 

2)上一页

void __fastcall TUniFormUser::UniBitBtn9Click(TObject *Sender)

{

if(UniDBGrid1->WebOptions->Paged)

         {

         UniDBGrid1->JSInterface->JSCall("pagingBar.movePrevious", "[]");

         }

}

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...