Snippet code to deselect selected table rows


Is there some javascript code I can use at the end of a mass action snippet to deselect selected rows on a table? This is so that the process can be repeated using a different mass action without having to deselect the records in between.

Thanks for the help!

Hi Louis,

Here’s a basic Mass Action Snippet that will alert the Names of the selected Rows, then unselect the selected Items:

var params = arguments[0],&nbsp; &nbsp; <br>&nbsp; &nbsp; list = params.list,<br>&nbsp; &nbsp; selectedItems = list.getSelectedItems(),<br>&nbsp; &nbsp; $ = skuid.$;<br>var rowNames = $.map(selectedItems,function(item){return item.row.Name;});<br>alert(rowNames.join('
'));<br>$.each(selectedItems,function(i,item){<br>&nbsp; &nbsp; item.selected = false;<br>});<br>list.render({<br>&nbsp; &nbsp; doNotCache:true<br>});

Thanks Zach! Worked a treat. Have a good weekend!