Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Expand first group but keep second group collapsed in List web part SharePoint Online

$
0
0

Hi

I have a custom list with a couple of columns I am grouping by.

Group by-
System
then group by
Status

I would like system to be expanded when the page loads but status not expanded (by default I have grouping as not expanded)

I attempted to follow this and placed it in a CEWP under the list WP

<script src="<link to JQuery.min>"
type="text/javascript"></script><script type="text/javascript">
$(function(){
    ExpCollGroup('1-2_','img_1-2_');
});</script>

The ID of the image which you can find with F12 an clicking on the expand/collapse 'column' -

1-2_','img_1-2_

is changing every time you refresh the page so it will only work once. So close - can anyone suggest anything?

Thanks

Jamie



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>