P-Bagles,
Although I am not 100% sure if this is the best way to achieve this (you may look into JSLINK CONDITIONS), this method does meet the requirement that you are looking to achieve, with some small caveats in regards to sorting, etc.
Here is how you can achieve this.
COUPLE IMPORTANT NOTES for the LISTED code:
- *IMPORTANT:::: YOU WILL NEED TO CHANGE #scriptWPQ2 to the webpart ID
that is on your page, you can do an inspect element to find the web
part ID
- The tr:eq(2) part of the code will hide the FIRST row item ONLY in the list,
if you want to hide additional ones you will replicate this line of code and add additional tr:eq(3), tr:eq(4) (EXAMPLE AT THE BOTTOM), you
will need a new .html for each views PAGE with a content editor linked to
each .html file ON EACH PAGE!*
SOLUTION:
- Create your views, each view will get its own .aspx page
- In your site assets library create a .html file and put this code
THE CODE for html file(s):
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// IMPORTANT:::: YOU WILL NEED TO CHANGE #scriptWPQ2 to the webpart ID that is on your page, you can do an inspect element to find the web part ID
// This tr:eq(2) will hide the FIRST row item ONLY in the list, if you want to hide additional ones you will replicate this code, you will need a new .html for each view with a content editor linked to each .html file
$('#scriptWPQ2 tr:eq(2)').hide();
//$('#scriptWPQ2 tr:eq(3)').hide();
//$('#scriptWPQ2 tr:eq(4)').hide();
//$('#scriptWPQ2 tr:eq(5)').hide();
})
</script>
- Save the html file with a .html extension
- Add a content editor to each views aspx page and link it to each corresponding .html file (i.e. hide1row.html hide2rows.html)
Again, here is an example of hide1row.html
<script type="text/javascript">
$(document).ready(function(){
$('#scriptWPQ2 tr:eq(2)').hide();
})
</script>
AND FOR hide2rows.html (notice there is 2 .hide() commands)
<script type="text/javascript">
$(document).ready(function(){
$('#scriptWPQ2 tr:eq(2)').hide();
$('#scriptWPQ2 tr:eq(3)').hide();
})
</script>
Understanding this is a big workaround, once you get the hang of it, it should be pretty easy to achieve and replicate.
Good Luck!