Skip to main content
Nintex Community Menu Bar
Solved

Code to deselect first row in list view

  • September 16, 2020
  • 2 replies
  • 41 views

Hi All

 

Wonder if there any code gurus who could help on this request (or tell me if it's possible)

 

I'm using the script at the bottom of this post to automatiaclly select the first row of a list view (which is contained on a form).  This is so I can run the 'on click' event automatically without the user having to do anything.

 
However I'm now after some code to automatically deselect the first row (so a reverse)
 
Can anyone help?
Paul
 
================================================
<script>
$('div[name="PanelTitle"]').find($('td.first'))[0].click();
</script>
================================================

Best answer by Albarghouthy

Hi,


 


Try this script


<script>
var contentTable = $('.grid').find('.grid-body-content');
$(contentTable).find("tr:eq(0)").removeClass('highlighted selected');
</script>

2 replies

Albarghouthy
Forum|alt.badge.img+16
  • Scholar
  • Answer
  • September 16, 2020

Hi,


 


Try this script


<script>
var contentTable = $('.grid').find('.grid-body-content');
$(contentTable).find("tr:eq(0)").removeClass('highlighted selected');
</script>

  • Author
  • October 2, 2020

thanks Mustafa


Your code works perfectly - thanks

Paul