Related item Row Colouring

rss

Posted by Hatice Togrul Gürol - Feb 5 ’15 at 06:54

Hi Dmitry ,

I want to make row color  in a  related items' rows.

I do it in separete  list by adding script editor. I use row color using jquery

$(document).ready(function () {

$Text = $("td.ms-cellstyle.ms-vb2:contains('High')"); $Text.parent().css("background-color","#01DF3A");

$Text = $("td.ms-cellstyle.ms-vb2:contains('Rejected')");

});

But when I want to use this list view in my related items, this list is not showing with this color.It look default view.This script editor is not working in related items.

could you please tell me how can I do this  for related items?

 

 

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 11 months 29 days
    #1 by Dmitry Kozlov Feb 6 ’15 at 02:43

    Hi,

    The following code works for me:

    $("td.ms-vb2:contains('High')").parent().css("background-color","#01DF3A");

    Please, set Render property of the Related items control in Server and insert the code above into JS-editor.

  • wdeffner
    Member
    Member for: 2 years 11 months 27 days
    #2 by wdeffner Oct 25 ’16 at 07:24

    [#1]: I defined the changing row-colors by setting the template of the original view in sharepoint to "shaded". However the related-items-list ignores this setting and displays all rows in white

    Thank you!

    Wolfgang

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 11 months 29 days
    #3 by Dmitry Kozlov Oct 26 ’16 at 05:07

    [#2]: Hi,

    Try to switch Render property of the Related Items control to Server in Forms Designer.

  • wdeffner
    Member
    Member for: 2 years 11 months 27 days
    #4 by wdeffner Oct 27 ’16 at 10:44

    [#3]: Hi,this makes difference, template "shaded" (iin german: "Schatten") is not applied.

    Thanks,

    Wolfgang

Displaying 1 to 4 of 4 messages