Sunday, July 11, 2021

PowerApps: Pagination Part-4

 Hello Friends,

Welcome back with another post on PowerApps. In last post we had created screen and implement pagination (Previous/Next) on Gallery. You may visit my last post by clicking on below link-

  1. PowerApps: Pagination Part-1
  2. PowerApps: Pagination Part-2
  3. PowerApps: Pagination Part-3
Now we will create Pagination On Dat Table. For this we will use the screen "ScreenTableView". 
For this, there is no change between Grid & Data Table except the page per records. In gallery, we have gallery height as well as individual template height to calculate the number of records that can be displayed in grid without scroll. But as Data Table is a ReadOnly control, it does not provide any way to get the individual row height so that we can calculate the total number of records that can be displayed in table. therefore, we will replace the code to get records per page as below-
  1. For Grid control it was-
    1. GalleryDailyTasksGrid.Height / GalleryDailyTasksGrid.TemplateHeight
  2. For DataTable it would be replaced by-
    1. DataTableDailyTaskTable.Height / 50

Here "DataTableDailyTaskTable" is the name of the Datatable control. The screen looks like-

This way, we can implement the pagination on Datatable also. Now in case, if we want to have pagination in terms of numbering like "<, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, >". We will see this implementation in our next post.

With this, I am concluding this post.
Happy Coding !!!
Will see you again with some new topics.

Stay Safe !
Stay Healthy !

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.