Freeze columns in SharePoint List

Copper Contributor

Good Afternoon, 

 

I would like to freeze the first  (and maybe second) column of a large list I have so when users scroll, they can still see the first column, like in Excel. I’m trying to see if anyone is familiar with how to do this or has script to accomplish this task.

 

Thanks!

 

Arielle

22 Replies
You cannot freeze the first header of a large list, but sticky headers are coming to SPO lists

@Arielle Gerstein 

 

Try Sticky Headers.  I added the javascript into my Masterpage. http://spoodoo.com/stickyheaders-for-sharepoint-update-v3-2-0/

 

@Deleted Thanks! I currently have sticky headers for the top row but not the first column. Is the file available for download here? http://spoodoo.com/products/stickyheaders-for-sharepoint/

 

Nothing is showing up when I click on this page.

By the way, If your list is a modern list you are not going to be able to use it because it's not recommended / supported to modify SPO sites master pages

@Juan Carlos González Martín Thanks! The list is isn't modern - we are using sticky headers for rows already but haven't had luck deploying them for columns so far.

I'm going to answer your problem - which is that you have a wide and/or long list and users need to scroll L-R as well as up/down. The answer (again) is to use the modern UI because it will allow you to significantly limit the number of fields you have displayed in the view.

Because the modern UI let's you easily display ALL fields for an item in the details pane and bulk update multiple items at once, you no longer need to display every column in the list like you did in classic mode. I trim my default views down to only the fields needed to sort & filter the list.

https://support.office.com/en-us/article/View-and-edit-information-about-a-file-folder-or-link-in-a-...

As for the large number of items in your list, you should introduce your users to the smart filter button. You can pin fields to the filter button. Hit the button, select your filter terms and apply. Tah dah! much shorter list! :)

https://support.office.com/en-us/article/what-is-the-list-and-library-filters-pane-293561ed-fb2e-4fb...

@Arielle Gerstein i'm also trying to freeze 1st column in list and headers but didn't found any solution so far. Have you found anything to resolve this?

@Shrutika_S  Try "Sticky Headers" from Spoodoo.com.  I've added it to the Masterpage so it shows up everywhere. http://spoodoo.com/downloads.

@Shrutika_S I've used sticky headers to freeze the first row in a list, couldn't make it work for the first column.

@Deleted will this JS code work for modern SharePoint page as script webpart is not available in it?

 

Spoiler
@Arielle Gerstein can you please help me with code for sticky headers? I'm looking for the same to use on SharePoint o365
@Arielle Gerstein can you please help me with code for sticky headers? I'm looking for the same to use on SharePoint o365

@Shrutika_S  I have not tried this in O365 or Modern Pages as I am currently still on-prem with SharePoint 2016. What I have done was to incorporate it into the Masterpage just before the ending </head> tag. <SharePoint:ScriptLink language="javascript" ID="ScriptLink3" Name="/_layouts/15/CustomScripts/stickyHeaders_3.2.0.js" runat="server" />

 

I know Microsoft does not want you to alter the Masterpage, so maybe incorporate it via SPFx if you are familiar with it (I'm just learning it now).  You could also put the .js file in Site Assets and reference it using the Script Editor Web Part or Content Editor Web Part, but then you would have to do this on every page you need the feature.

@Arielle Gerstein can you please help me with code for sticky headers? I'm looking for the same to use on SharePoint o365

@Shrutika_S 

 

Sticky headers happens automatically in modern lists on SharePoint O365. You don't need code to make it happen. Your lists must be in modern experience, so you won't see it on classic lists like task or calendars. 

The original post was talking about freezing columns, not sure why everyone is talking about freezing/sticky headers (header row).

 

For lists that span wider than 1 screen width (especially when even small columns have a minimum width), freezing columns is quite crucial. Any idea how I can achieve this in modern Sharepoint?

@WenWong 

 

There is no way to freeze columns. I have a longer post higher up in the thread on things you can do to minimize the amount of L-R scrolling. One of the benefits of modern UI is you no longer need to have EVERY field showing in the view. Leverage that to minimize horizontal scrolling.

I know this is an old thread, but I am seeing a sticky first column in the Data Grid View in SharePoint Online lists now by default. If the column can be frozen in grid view I assume it can also be frozen in a standard view. Is it possible now?