Related item Row Colouring
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 KozlovAdminMember for: 8 years 10 months 17 days
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.
-
wdeffnerMemberMember for: 5 years 10 months 15 days
[#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 KozlovAdminMember for: 8 years 10 months 17 days
[#2]: Hi,
Try to switch Render property of the Related Items control to Server in Forms Designer.
-
wdeffnerMemberMember for: 5 years 10 months 15 days
[#3]: Hi,this makes difference, template "shaded" (iin german: "Schatten") is not applied.
Thanks,
Wolfgang