web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Issue using Dataset Paging

(0) ShareShare
ReportReport
Posted on by 200

Hi Team,

 

We are facing some issues while making use of a few of the documented functionalities of dataset paging. I’d list down each one of them along with the issue being faced.

 

  1. parameters.sampledataset.paging.loadNextPage() – While using this, it doesn’t give us the data only for next page, but it gives data for the current page + next page i.e., say on my current page I have 50 records and on next page I have 25 records, then I get 75 records.
  2. parameters.sampledataset.paging.reset() – Reset, at time doesn’t reset the page to Page Number 1. It just stays on the same page,when we are changing page by loadNextPage() and loadPreviousPage().But when I change the page of OOB grid and then switching to my control then reset page and other function are working
  3. parameters.sampledataset.paging.hasPreviousPage – This doesn’t return true, if we use context.parameters.sampledataset.paging.loadPreviousPage()
  4. parameters.sampledataset.paging.loadPreviousPage() – This doesn’t work once we reach to the last page

5.context.parameters.gridPageNumber - Is this a supported method to get the current page number, when I switching for the OOB grid to control then it gives the correct page number except for the first page but for rest, it gives the correct page number.But if I loadNext or previous page using  loadPreviousPage() or loadNextPage() it doesn't give page number

I have other few questions, is there a way to get the values of the next page only, i.e., if next page has 25 records then just get 25 records.

 

Also, is there a way to get the current page number?

I have the same question (0)
  • Sheldon Copper Profile Picture
    200 on at
    Re: Issue using Dataset Paging

    Hi Team,

     

    Any help on this would be really appreciated.

     

    Thanks!

  • Ashwini01 Profile Picture
    2 on at
    Re: Issue using Dataset Paging

    Hi,

     

    we also facing same issue please help on same.

     

    Thanks!

  • AnqiChen Profile Picture
    on at
    Re: Issue using Dataset Paging

    hi Ashwini,

     

    1) The behavior of loadNextPage is suppose the [firstpage, lastpage] is [1,1]

    If using loadNextPage, it will turns to [1,2] , we will load page 2 data for u, along with existed page. Similarly, if loadNextPage again, it will be [1,3]

    And as the records range is already [1,2], there is no previous page before 1 to be retrieved, so hasPreviousPage turns to false

     

    2) If needs to retrieve the exact page 2 data, just use loadExactPage(N), or any number u want. It will jump to [2,2]

     

    3) reset makes the range turns to [1,1]

     

    4) We do not suggest use gridPageNumber, it's not supported. It needs to track the current page number in the code

     

    5) On mobile device, loadNextPage multiple times, it will start to add more records, so at one point, the data will be a range like [3,7]. The start point won't always be 1

     

    Feel free to let us know if there are questions

     

  • Bhuvita Sisodiya07 Profile Picture
    78 on at
    Re: Issue using Dataset Paging

    @AnqiChen 

     

    Can you please throw more light on loadExactPage(N). I tired it this doesn't seems to be working.

     

    I also want to achieve the functionality where i just need to load only next page records not all the records.Like the OOB subgrid works.

  • Sheldon Copper Profile Picture
    200 on at
    Re: Issue using Dataset Paging

    Hi @AnqiChen ,

     

    We were successfully able to make use of loadExactPage(N), but, then we faced a couple of issues doing so, 

     

    - The loadExactPage, doesn't return data on the first UpdateView call, it returns data when the loadExactPage is invoked again. Basically, for the first time (after page refresh), we have to click twice in order to get the desired result.

     

    -  If using loadExactPage, we are moving forward i.e., from Page 1 to Page 2 to Page 3, it gives proper data of the respective page only, but, if we try going backward i.e., from Page 3 to Page 2 to Page 1, it again sums up all the data i.e., if the page size is 50 then going backward from Page 3 to Page 1, would return 150 records.

     

    Do we have any way of knowing the current page number, it gets difficult to know the page number when the user has traversed through a couple of pages using OOB grid and then switches to the PCF control?

     

    Please help me with this.

     

    Thanks in advance for your assistance.

  • Bhuvita Sisodiya07 Profile Picture
    78 on at
    Re: Issue using Dataset Paging

    @sheldoncopper73 

     

    What did you pass in N in loadExactPage(N) ?

  • Sheldon Copper Profile Picture
    200 on at
    Re: Issue using Dataset Paging

    Hi @Bhuvita ,

     

    We invoked it as loadExactPage("2").

     

    Note:  You need to click your button (the one which invokes loadExactPage(N) method) twice for the first time after page loads. Clicking the button once, won't invoke UpdateView for the very first time after page load. (This could be a probable bug.)

  • Bhuvita Sisodiya07 Profile Picture
    78 on at
    Re: Issue using Dataset Paging

    @sheldoncopper73 

    Thanks for your reply.

    Is there any way we can get the current page number so that we don't need to hardcode the page number.

  • Sheldon Copper Profile Picture
    200 on at
    Re: Issue using Dataset Paging

    @Bhuvita 

     

    We were trying to make use of gridPageNumber, but, @AnqiChen  said that it is unsupported. Even we'd be interested in knowing if there is any way of knowing the current page number.  

     

    We already have raised a couple of issues that we faced while implementing loadExactPage(N). 

  • AnqiChen Profile Picture
    on at
    Re: Issue using Dataset Paging

    hi Bhuvita and Shelton,

     

    From this thread, it seems there potentially have bug that we were not aware of, thank you for pointing this. We will check this at our end and see.

     

    Meanwhile, if you have a simplified solution version to indicate the issue, feel free to send to us through creating a ticket to us, or email to achen@microsoft.com / hemantg@microsoft.com, or just post here.

     

    'gridNumber' is designed for OOB control usage only and cater for its specific scenario. I understand that it needs additional step to do the page number management at your side, which hopefully the workload is limitted.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 819 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 308 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 222 Super User 2025 Season 2

Last 30 days Overall leaderboard