Skip to main content
Nintex Community Menu Bar

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() {$("spananame='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

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');

 


Thanks Mustafa,

 

I'll have a look at this


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


Reply