Monthly Archives: July 2013

Need to modify the width of a SharePoint column in a view? jQuery!

I recently had a request on one of my sites to increase the size of the Description column in the SharePoint views. Out of the box, there’s no easy way to do that. But, with a little snippet of jQuery placed in a Content Editor Web Part on the page with the view, you can easily change any of the column widths…

Here’s the code I used:

<!--ADJUST TABLE COLUMN WIDTH-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript">
</script>
<script type="text/javascript">
$(function(){
$("div.ms-vh-div:contains('Description')").css("width", "350px");});</script>

If you have multiple columns to modify, just repeat the line with the “div.” string. This is so simple, my customer went in and made her own changes to the code.

Many thanks to Mark Miller, who provided the solution in the post SharePoint jQuery: Setting View Column Width.

 

How do sites in the My Sites Memberships list get there? And what if one is missing?

This was an interesting puzzle yesterday…

I get a customer help desk case about the Memberships list in her My Site page. She is the owner of a site that I set up for her, but it doesn’t show up on her My Site page. I really don’t use that feature, so I started digging around.

My thought was that I could just tell her how to add it manually. Um, no… Seems to be no way to do that through the UI. So if they get out there automatically, how does that work and why is her site not on there if she’s the owner.

I found my answer here: http://www.uccorner.com/183/sharepoint/memberships-in-sharepoint-2010-user-profile/

The Memberships list is driven by being listed in the *Members* group of the site in question. It doesn’t matter if you’re in the Owners group, the Visitors group, or listed individually. If you’re in the Members group for a site, that site will show up in your My Sites list. If not, it won’t.

To fix this, I added her to the Members group (she was already in the Owners group) and waited for the timer job to run. Once it did, her site was out there.

This is now recorded here for my “external brain usage” (and hopefully for anyone else confused like I was).