locked
Show colors In CRM 2011 Grid Cell?? RRS feed

  • Question

  • HI All,

            Here I have a requirement that my client want to see the grid view cells in different colors. For example in CRM Open Leads view the grid should show all Hot Leads in "Green" Color. All Cold Leads in "Red" Color etc. Here i need to show only the respective record cell in color but not the entire row.

    Regards,

    Srikanth A

    Wednesday, March 6, 2013 8:41 AM

Answers

  • Hi All,

             Thanks for all the suggestions and i achieved this requirement by using the below code. It isworked.

    function alterGridRecords() {
    
        var gridTH = document.getElementById("crmGrid_divDataArea");
    
        var headers = gridTH.getElementsByTagName("TH");
    
        var tdata = gridTH.getElementsByTagName("TD");
    
        for (var n = 0; n < headers.length; n++) 
        {
            if (headers[n].innerText == "Rating") 
            {
                for (var i = 0; i < tdata.length; i++) 
                {
                    if (tdata[i].innerText == "Hot") 
                    {
                        tdata[i].style.backgroundColor = "green";
                    }
                }
            }
        }
    }
    
    


    Regards,

    Srikanth A

    • Marked as answer by Srikanth A Wednesday, March 6, 2013 11:47 AM
    Wednesday, March 6, 2013 11:47 AM

All replies

  • Hi,

    There is no supported way to achieve your requirement. 


    Chandan - http://mscrm-chandan.blogspot.in/ I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful !!!

    Wednesday, March 6, 2013 8:49 AM
  • Hi Srikanth,

    If your customer is using outlook client you can better try Categorizing the records based on colors.

    Regards,

    Ravi

    Wednesday, March 6, 2013 9:06 AM
  • Please check the following link although it is unsupported
    http://mscrmtools.blogspot.com/2012/01/how-to-colorize-grid-rows.html

    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.
    Mubasher Sharif
    Check out my about.me profile!
    http://mubashersharif.blogspot.com
    Linked-In Profile
    Follow me on Twitter!

    Wednesday, March 6, 2013 10:01 AM
  • Hi All,

             Thanks for all the suggestions and i achieved this requirement by using the below code. It isworked.

    function alterGridRecords() {
    
        var gridTH = document.getElementById("crmGrid_divDataArea");
    
        var headers = gridTH.getElementsByTagName("TH");
    
        var tdata = gridTH.getElementsByTagName("TD");
    
        for (var n = 0; n < headers.length; n++) 
        {
            if (headers[n].innerText == "Rating") 
            {
                for (var i = 0; i < tdata.length; i++) 
                {
                    if (tdata[i].innerText == "Hot") 
                    {
                        tdata[i].style.backgroundColor = "green";
                    }
                }
            }
        }
    }
    
    


    Regards,

    Srikanth A

    • Marked as answer by Srikanth A Wednesday, March 6, 2013 11:47 AM
    Wednesday, March 6, 2013 11:47 AM