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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to add Pagination ...
Power Apps
Unanswered

How to add Pagination in Fluent UI Detailslist using react for custom pcf control

(0) ShareShare
ReportReport
Posted on by 3

I am using fluent UI Details List control (https://developer.microsoft.com/en-us/fluentui#/controls/web/detailslist) to display records in a grid and its working fine.
The only issue I am facing is pagination in the Details List. The reference link I am using to implement this is https://www.alphabold.com/develop-pcf-control-using-ms-fluent-ui-and-react/. I have implemented this by using custom PCF field control.

I am not sure this is the correct way to display entity records if there is no direct link with the entity where we are displaying this list on form. There is no direct relationship between the entities.
So I cannot create a view on entity which I can display in sub grid and create custom PCF dataset control which can display pagination.

Is there any way we can add pagination to Details List or some other component like dataset can be used for this requirement?
Please help here

I have the same question (0)
  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @priyankajadhav , 

     

    You can use a dataset PCF. Even if you don't have a relation to the host table(entity), you can place a subgrid which is not limited to the parent entity (show all records). Then you can use the PCF Dataset filtering sdk to filter your data as you need. This will provide a few advantages over a field PCF: having the data provided by the framework to you, search box, view switch, using the ribbon.

    Regarding paging using FluentUI DetailsList, I have a blog series, and one part is about paging: https://dianabirkelbach.wordpress.com/2020/10/05/dataset-pcf-using-fluentui-paging/

    You might find some other interesting parts. The github repository is here: https://github.com/brasov2de/ColorfulOptionsetGrid

     

    Also you might find some interesting examples in the sdk: https://docs.microsoft.com/en-us/powerapps/developer/component-framework/use-sample-components?WT.mc_id=BA-MVP-5004107

     

    Hope this helps!

    Kind regards,

    Diana

  • Priyanka J Profile Picture
    3 on at

    @DianaBirkelbach Thank you so much for this solution. I have tried this by using PCF dataset and able to filter the data by field of same entity. Now I want to apply filter on link entities field but unable to do the same. Appreciate your help here 

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @priyankajadhav , 

     

    I haven't tried to filter on linked entities, but I have digged a little in the docs.

    1. One way could be by using the .linking.addLinkedEntity and setting the linkType "inner". That could be enough for the case where you just need to filter on relations. (https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/linking/addlinkedentity?WT.mc_id=BA-MVP-5004107)
    2. If you need some more filtering conditions, maybe this works:
      1. set the alias when you define the linking (https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/ilinkentityexposedexpression?WT.mc_id=BA-MVP-5004107#alias)
      2. set the filter using <your_dataset>.filtering.setFilter (https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/filtering/setfilter?WT.mc_id=BA-MVP-5004107).
        There you can use the entityAliasName where you can use the alias defined by linking. (https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/conditionexpression?WT.mc_id=BA-MVP-5004107#entityaliasname)

     

    This would be something like this (but as I said, I haven't tried it out):

    dataset.linking.addLinkedEntity({
     // ...
     alias: "myAlias"});
    
    dataset.filtering.setFilter({
    	filterOperator: 0, //And
    	conditions: [{
    		attributeName: ...,
    		conditionOperator: ...,
    		value: ...,
    		entityAliasName : "myAlias"
    	}],
    	filters: [],
    });

     

    Hope this helps!

     

    Kind regards,

    Diana

  • aroudaki Profile Picture
    Microsoft Employee on at

    you can also check this tutorial on create a PCF grid using Fluent detail list
    Create a model-driven app dataset component in Microsoft Dataverse - Power Apps | Microsoft Docs

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

Forum hierarchy changes are complete!

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard