Skip to main content
Nintex Community Menu Bar
Solved

Editable List View Table Background Colour

  • July 31, 2017
  • 3 replies
  • 14 views
  • Translate

Forum|alt.badge.img+16

Hi,

 

Normally i use a Javascript (Data label + expression) in View and Form tables to change the Table background as follows:

 

<script type="text/javascript">$(document).ready(function() {$("span[name='TableCSS']").closest('table').css({'border':'darkgrey 1px solid', 'background':'#White'});})</script>

 

But I simply cannot get the above to work when the Table in in an Editable List. The Tables above the Editable List have a grey background, I want to change it to white, but the above script will not apply it.

 

I have put the data lable inside the Table and no matter where i place it, the table background remains Grey.

 

As mentioned, same script works on Item Views and Forms, just won't work with List/editable View.

 

I don't want to touch the CSS templates etc and prefer the Javascript method.

 

Any ideas how why it isn't working?

 

Thanks

Best answer by Albarghouthy

Hi Sharepharp1,


 


 


 


<script type="text/javascript">$(document).ready(function() {

$("div.grid-body-content > div > div > table").css({'border':'darkgrey 1px solid', 'background':'red'});

})</script>

 


 The list view will look as below:


 



 


If you want all the background to be 1 color only you will need to change the class of the grid but it will reset when the list refreshes or on other events:


 


The current class for the list view is grid-content-table zebra-stripes


This will change the table class:


 


$("div.grid-body-content > div > div > table").attr('class', 'grid-content-table');

 

View original
Did this topic help you find an answer to your question?

3 replies

Albarghouthy
Forum|alt.badge.img+16
  • Scholar
  • 741 replies
  • Answer
  • July 31, 2017

Hi Sharepharp1,


 


 


 


<script type="text/javascript">$(document).ready(function() {

$("div.grid-body-content > div > div > table").css({'border':'darkgrey 1px solid', 'background':'red'});

})</script>

 


 The list view will look as below:


 



 


If you want all the background to be 1 color only you will need to change the class of the grid but it will reset when the list refreshes or on other events:


 


The current class for the list view is grid-content-table zebra-stripes


This will change the table class:


 


$("div.grid-body-content > div > div > table").attr('class', 'grid-content-table');

 

Translate

Forum|alt.badge.img+16
  • Author
  • Scout
  • 644 replies
  • August 1, 2017

Thanks Mustafa,

 

I'll have a look at this

Translate

Forum|alt.badge.img+7
  • 71 replies
  • October 12, 2018

I want to update only based on some column value not altrenate. hw can we do it ?

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings