I discovered something today that – whilst it may seem obvious to most! – is not something I’d realised was possible and I’m sure it’s going to save me a bucket load of time. I’d bet that on most SharePoint 2010 sites XSLT List View Web Parts (XLVs) are everywhere – they are on mine anyway.
Configuring views for these XLVs is always something that I’ve done by editing the web part and then selecting the ‘Edit the current view’ link. Occasionally I set up a view on the list/ library itself and use that – but more often that not it’s a one-off view for a particular page.
Today I was pleasantly surprised to find that there’s an easier and quicker way to do this!
As we are all now familiar with the ribbon I don’t need to go into great lengths at just how useful this is a productivity aid – particularly when working with the contents of lists and libraries. However, you can also use it to modify the settings of the lists themselves – including configuring the current view in an XLV!
Very simply, select your list so that the context sensitive List or Library ribbon tab appears and then click the Modify View button. From there you’ll be taken to the familiar edit view screen – the only difference being that you won’t see the options to set the view name and view URL.
Click OK after making your changes and bang – there’s your modified view. So now there’s no need to edit the web part properties (and wait for a full screen refresh!) you can just go straight in and modify your view.
One gotcha I did find was that whilst this works immediately on a non-publishing site, you still have the ‘issue’ of having to check out a page before modifying the view on a site with publishing enabled. Obviously this is the correct behaviour, but the usability is very poor. Forget to check out the page and you’ll see this error when trying to save your customised view. [It would be better if the option to modify the view was greyed out unless the page was checked out.]
I hope that helps save you some time when editing your XLVs!