From the course: SharePoint: Migrating from Classic to Modern Sites

Customizing views - SharePoint Online Tutorial

From the course: SharePoint: Migrating from Classic to Modern Sites

Start my 1-month free trial

Customizing views

- [Instructor] Views provide a way to organize and customize how and what data is returned in your SharePoint lists and libraries. It's important to understand the key differences in Views between classic and modern lists to ensure that your lists are migrated properly. Let's start with an example of a list in an on-prem SharePoint environment. Here on our IT site, we have a projects list. In this list, we're tracking the project name, manager, cost, completion date and a description. In this list, you'll notice that we're using some list view formatting. Every other row is shaded in a gray color. This is done with the list styling options. If we go into the list settings and scroll down to our view and expand out the style section, these are the classic list styles available to us. In this case, we're using the shaded list style. Now let's take a look at the same list in a modern SharePoint list. As you can see, modern SharePoint lists look really different than classic SharePoint lists. It's important to note with your modern SharePoint lists, the classic list styles options won't show up in this list. There's a new way of applying list styles and that's the called the SharePoint list and column formatting. If we click on our view and click on format this view, this is the new way of applying view formatting. In this text block, you can put in some JSON code which will allow you to override the look and feel of your SharePoint views. Microsoft offers a repository of different view and column samples which you can use. If you go to GitHub.com/SharePoint/spdevlistformatting, you can find this repository. If we want to recreate the shaded view here, we can do that with this example on the SharePoint view formatting. Let's go into view samples. The very first one here is alternating row class. This is how we can accomplish the shaded view in our modern SharePoint. It'll show you a screenshot of what this will look like and we can click on the JSON file and copy this code. Now back in our modern SharePoint list, in the format view section, all we have to do is paste in that code and we have a preview option here. If we click that, it'll show us a live preview of what this will look like and then we can click Save to apply for everyone that has access to this list. That's just one example of what you can do with the new SharePoint list formatting options. As you can see, there are multiple other samples for you to look at and take advantage of to modify your SharePoint list views. While modern SharePoint lists and libraries have a different look and feel than your classic versions, we've shown that you can still take advantage of all the customization options plus more.

Contents