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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

change color List view (grid) with condition

(0) ShareShare
ReportReport
Posted on by

Hi All,

I'm trying to change row color of my list view (grid) by condition.

Any idea please?

I have the same question (0)
  • Suggested answer
    SamiraM Profile Picture
    587 on at

    I was having similar requirement. Check this article. I have followed this and my grid is working as expected.

    arpitmscrmhunt.blogspot.com/.../dynamics-crm-dynamically-change-row.html

  • Community Member Profile Picture
    on at

    Thank you for your answer, it is just what i need,

    but can you tell where i can find the name of the 'td' please?

    thank you.

  • Suggested answer
    PhuocLV Profile Picture
    347 on at

    please try unsupported soluton CRM GRID PLS 2

    http://crmgridplus.com

  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at

    Hi,

    I don't think there is a supported way to implement your scenario. I suggest you look for or implement a PCF Control that meets your needs.

    Another approach would be to use custom icons on one of the columns of your grid. Indeed, this approach is supported..you can find the details of the implementation here: docs.microsoft.com/.../display-custom-icons-instead

  • Community Member Profile Picture
    on at

    Hi Mehdi,

    the best solution is with Js.

    @samira Mirza gave me an good link. but just i don't know how to find the 'td' in the JS proposed.

    arpitmscrmhunt.blogspot.com/.../dynamics-crm-dynamically-change-row.html

  • meelamri Profile Picture
    13,216 User Group Leader on at

    I agree that this may work. However, this approach is not supported. Indeed, according to Microsoft, DOM manipulation is not supported.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    This is not supported solution to change the row color in Grid.

    try this solution: docs.microsoft.com/.../display-custom-icons-instead

  • Suggested answer
    SamiraM Profile Picture
    587 on at

    Check My JS below:

    function showEventStatusNew(rowData, userLCID) {

       debugger;

       if (rowData == null || rowData == 'undefined') return;

       // read rowdata

       var str = JSON.parse(rowData);

       var coldata = str.new_statoevento_Value;

       var rowId = str.RowId;

       var opened = str.new_opened_Value;

       if (coldata == null || coldata == 'undefined' || coldata.length < 1) return;

       if (!opened) {

           switch (coldata) {

               case 2:

                   $("tr[oid='" + rowId + "']").css('fontWeight', 'bold');

                   //       $('span:contains("Attivo")').parent().parent().css('fontWeight', 'bold');

                   break;

               case 0:

                   $("tr[oid='" + rowId + "']").css('fontWeight', 'bold');

                   break;

               default:

                   break;

           }

       }

    }

  • Community Member Profile Picture
    on at

    thank you Samira,

    but, when i implement your code the first choice disappeared from the list.

    maybe here i have a problem in the name of 'tr'.

    haw can i find it?

  • Arslan001 Profile Picture
    60 on at

    Hey Phuoc. I am interested in implementing this for our organization? just curious about how and why it is unsupported solution?

    Regards, Arslan

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 185 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 110

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans