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.
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?
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
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.
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.
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.)
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.
Check out our new profile badges recognizing authored solutions!
We are excited to announce the Power Apps Super Users!
Did you miss the call? Check out the Power Apps Community Call here.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!