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 Pages - Design & Build
Suggested answer

Bootstrap datagrid Integration

(2) ShareShare
ReportReport
Posted on by 2
I have one demo code for Bootstrap datagrid view. My Requriment is that as per demo code I want to display records in Portal from Contact table but using prebuilt Bootstrap datagrid. so if there is 10 select then it will call api display 10 records and also Pagination is include in Below demo code with prebuilt Bootstrap datagrid. so using pagination it skip selected record and call api then get 10 records but here i just give example selected record 10 but it should be dynamic as per bootstrap datagrid view. This is demo code but help me for implement dynamic for contact table using Bootstrap datagrid table and call web api Server Side using skip and token. Thanks in advance for helping..
 
Please see attached file for demo code.
 
Categories:
I have the same question (0)
  • Henil Profile Picture
    2 on at
    Bootstrap datagrid Integration
    Thanks for sharing but could you help me I don't want perform CRUD operation but only display records using web api and Directly server side per selection and per pagination call web api then then display only those records.
  • Suggested answer
    DP_Prabh Profile Picture
    21 on at
    Bootstrap datagrid Integration
    Hello,
    If you're looking to retrieve data from Dataverse using the Web API within your existing Bootstrap code, I recommend checking out the following resources that were helpful to me and might work well for you too:
    Additionally, if you're not familiar with writing AJAX functions, you can use the Dataverse REST Builder extension. It generates the AJAX code for you, which you can then paste directly into your Power Pages web page.
    Here’s the link to the extension on the Microsoft Edge Add-ons store:
    [Dataverse REST Builder - Microsoft Edge Addons]
    Hope this helps!
     
  • Henil25 Profile Picture
    6 on at
    Bootstrap datagrid Integration
    Hi @Jon Unzueta thanks but it is not working i want to display fullname and emailaddress1 in portal and I added all Table Permission and Site Setting. could you have idea that how call web api?
  • Suggested answer
    Jon Unzueta Profile Picture
    1,215 Super User 2025 Season 2 on at
    Bootstrap datagrid Integration

    1. HTML con Bootstrap Table

    Usa Bootstrap Table para facilitar la paginación del lado del servidor:

     
     

    2. JavaScript para llamadas a la Web API

    $('#contactTable').bootstrapTable({

        ajax: function (params) {

            const pageSize = params.data.limit;

            const offset = params.data.offset;

            const token = "YOUR_ACCESS_TOKEN"; // Usa el token del portal si es necesario

            fetch(`https://yourorg.crm4.dynamics.com/api/data/v9.2/contacts?$top=${pageSize}&$skip=${offset}&$count=true`, {

                headers: {

                    "Authorization": `Bearer ${token}`,

                    "Accept": "application/json"

                }

            })

            .then(response => response.json())

            .then(data => {

                params.success({

                    total: data['@odata.count'],

                    rows: data.value

                });

            })

           .catch(error => {

                console.error("Error fetching contacts:", error);

                params.error(error);

            });

        }

    });

    3. Configuración del Web API

    • Asegúrate de que el endpoint incluya ?$count=true para obtener el total de registros.
    • Usa $top para el número de registros por página.
    • Usa $skip para omitir los registros ya mostrados.

    4. Seguridad y Autenticación

    • Si estás en Power Pages, puedes usar Web API con tokens del portal.
    • Alternativamente, puedes crear una Web API personalizada en Power Platform que actúe como proxy.

     

     
    🏷️ Tag me if you have any further questions or if the issue persists. ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems. ❤️ Give it a Like if you found the approach useful in any way.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#2
Lucas001 Profile Picture

Lucas001 48 Super User 2025 Season 2

#3
KevinGador Profile Picture

KevinGador 44 Super User 2025 Season 2

Featured topics