In Power apps portal you can use entity list to display a set of records from Dataverse. If you want to change the style of the list by using JavaScript or jQuery .

Let’s see how to do it.

The list normally appears like the below image, however depending on the needs of the business, List must be displayed in different colour.

Navigate to the Portal Management  app .Open the List and select Options Tab and copy paste the below code inside the JScript section.

 

//checks if document is ready
$(document).ready(function (){
//checks if list is loaded
$(“.entitylist.entity-grid”).on(“loaded”, function () {
//loop through all row of list
$(this).children(“.view-grid”).find(“tr:even”).each(function (){
$(this).css(“background-color”, “#8D918D”);
});

$(this).children(“.view-grid”).find(“tr:odd”).each(function (){
$(this).css(“background-color”, “#D1D0CE”);
});
});
});

Now save and sync configuration and reload the  page. You will see the list like below page.

For any Help or Queries Contact us on info@crmonce.com or +918096556344.