Alternating Row Colors

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
YumaIT
Posts: 18
Joined: Tue Oct 02, 2018

03 Nov 2018

I have placed a related table in a tab control and have the table pulling the correct records. How can I make each row alternate colors so that it is easier read? Here is an example:
Alternating Row Needs.JPG
Alternating Row Needs.JPG (96.93 KiB) Viewed 2093 times
Notice Action # 32 and Action # 73; I would like to make the rows here alternate in colors.

Thanks in advance for any guidance.

User avatar
AlexZver
Posts: 232
Joined: Mon Aug 27, 2018

05 Nov 2018

Hi!

First of all, you should assign a CSS class to your related items table, i.e. "related-issues". Then add this CSS rule to your CSS Editor:

Code: Select all

.related-issues .ms-alternating td {
    background-color: gray;
}

YumaIT
Posts: 18
Joined: Tue Oct 02, 2018

06 Nov 2018

Alex, thanks for this. What if I already have a CSS class assigned to this? Can my clas have multiple parameters? For example, the CSS class Assigned is:

fd.populateFieldsInGrid($('.related-items'), {
Ticket: '{CurrentItem}',
});

That is added in the Javascript Editor already. Can I simply add the alternating code to it?

User avatar
AlexZver
Posts: 232
Joined: Mon Aug 27, 2018

06 Nov 2018

Hi!

No, no, no, not in the JavaScript Editor, but in the CSS Editor.
Screenshot_89.png
Screenshot_89.png (15.98 KiB) Viewed 2082 times

Copy and paste this code:

Code: Select all

.related-items .ms-alternating td {
    background-color: gray;
}

YumaIT
Posts: 18
Joined: Tue Oct 02, 2018

12 Nov 2018

Thank you Alex, this worked perfectly. Again, thanks for your help!

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests