Related table

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Sonoma
Posts: 88
Joined: Wed Oct 15, 2014

08 Feb 2017

Hi.

How do I set the back ground color of a single column. Without the id I can't seem to isolate the column. I did try to do it by the table ID itself but no luck. Thanks.




$.each( $("[id*={366BE707-20E1-4D05-A9D8-1A2B4AE91F74}-{D3158B9E-C845-481E-A84C-1C0169C429B6}]") , function () {

$(this).closest('td:nth-child(3)').css("background-color","#01DF3A");

});

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

09 Feb 2017

Hi,

Assign a CSS class, say, 'related-items' to the Related Items control and insert the following code into CSS-editor:

Code: Select all

.related-items table.ms-listviewtable > tbody > tr > td:nth-child(3) {
  background: red;
}

Sonoma
Posts: 88
Joined: Wed Oct 15, 2014

09 Feb 2017

Awesome. I forgot I could append via adding the Layout -> css Class -> related-items

This in conjuction with this to rename my headers

$.each( $("[id*=OPTDD1]") , function () {

$(this).closest('th').html("<center>Diagnosis/recurrence<br />date of other<br />primary cancer(s):</center>");

});

$.each( $("[id*=OPTDD2]") , function () {

$(this).closest('th').html("<center>Diagnosis/recurrence<br />date of other<br />primary cancer(s):</center>");

});

$.each( $("[id*=OPTDD3]") , function () {

$(this).closest('th').html("<center>Diagnosis/recurrence<br />date of other<br />primary cancer(s):</center>");

});


I can rely only on this tool and lose the KwizCom repeating rows control.


Maybe in the future we will have this capability with in the Forms Designer tool enabling us to change html headers in the with the area containing the TITLE -> Value.

Maybe TITLE - DisplayName with ... to allow HTML syntax to allow something like this

<center><b>Other Primary Cancer</b></CENTER><br />

Time frame: From <B>90 days prior to the index date</B> through the end of the third progression-based line of therapy, or through<br />

the end of the record, whichever occurs first.



We have many custom headers which I change with JQuery. It works but lots of code to keep up with.


Thank you.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests