Nov
20
2008

Showing "my links" with QuickLinksMicroView web part - Issues you should know about

Ishai's post - Showing "my links" on a web page has explained how you can use the QuickLinksMicroView web part to show users "my links" on SharePoint web part page.

The web part looked great when I first added it to the web part page, but it wasn't long before I discovered some of "bugs" in this web part. Bugs or by design?

I will show you what those bugs are by using following configurations: Two groups, 6 links in the first group and 3 links in the second group.

James Tsai .Net SharePoint Blog - QuickLinksMicroView Items

Now let's change the default "Number of rows to display" value from 10 to 2

 James Tsai .Net SharePoint Blog - QuickLinksMicroView Configuration

Click Ok and see what it gets us.

1. "Show/Hide additional links" hyperlink will not work without "portal.css" CSS registration

James Tsai .Net SharePoint Blog - QuickLinksMicroView No Portal CSS

As you can see there is a "show 4 additional links" hyperlink at bottom of the first group (Don't worry about the second group for now, I will get to that later).  Click on the link toggles the display text (hide/show 4 additional links) without change the number of displayed items in group (no actual hide or show for additional items).

The problem here is More...

Oct
27
2008

How To Create AJAX-enabled SharePoint Web Part with UpdatePanel and UpdateProgress in 10 minutes

In this post I am going to show you how you can setup your SharePoint site to support Microsoft ASP.NET AJAX framework and create a basic AJAX-enabled SharePoint Web Part. You can find many great articles on MSDN on how to do these and they explained in more details, but if you are looking for a way to get it up and running in 10 minutes, this is it.

James Tsai .NET SharePoint Blog - AJAX enabled webpart 

James Tsai .Net SharePoint Blog - AJAX enabled webpart updating

An AJAX-enabled web part with update button and display current time every time when button is clicked. Loading image and text displayed during the update.

Goal

  • Enabling SharePoint site with ASP.NET AJAX framework support
  • Create AJAX-enabled SharePoint web part
    • with UpdateProgress control for visual feedback in browser when web part is updating
    • with AJAX request event script to hide UpdatePanel while web part is updating
  • Add AJAX-enabled web part to page and see it in action

More...

Oct
9
2008

How to change SharePoint Calendar default start hour and end hour of Day View

Default Day View of SharePoint Calendar control has its start hour set to 7am and end hour to 5pm.

James Tsai .Net SharePoint Blog - Default Day View Start Hour

To change this you'll need to update SPRegionalSettings.WorkDayStartHour and SPRegionalSettings.WorkDayEndtHour properties. And it is not something you can do from UI.

For example, to change start hour to 6am and end hour to 6pm you'll have to write and run this code

using (SPSite site = new SPSite("http://<YourSiteUrl>"))
{
    using (SPWeb web = site.RootWeb)
    {
        SPRegionalSettings regionalSettings = web.RegionalSettings;
        regionalSettings.WorkDayStartHour = 360;
        regionalSettings.WorkDayEndHour = 1080;
        web.Update();                  
    }
}

 

The possible values you can set for WorkDayStartHour and WorkDayEndHour are 60 x (hour value in 24 hour format).

Basically, they are total number of minutes. For example,

6am = 6 x 60 = 360

6pm = 18 x 60 = 1080

9pm = 21 x 60 = 1260 and so on..

As you can see, the start hour of Day View in calendar has now changed

James Tsai .Net SharePoint Blog - Changed Day View Start Hour

Hope it helps

-James

Oct
6
2008

How to use SharePoint Delegate Control to change the navigate URL of Manage Links (My Links)

Microsoft Office Online -

By using the My Links menu, you can easily add new links, reorganize your links, access sites where you are a member, and click links to save them to you My Links list.

You can use this feature when you have "My Site" setup and running in your SharePoint Shared Services.

James Tsai .NET SharePoint Blog - My Links Manage Links menu control

Problem

Let's say you have following two site collections setup for your SharePoint intranet site and My Site.

Intranet - http://intranet/

My Site - http://mysite/

When user is accessing manage links page by clicking on My Links, Manage Links menu on Intranet site, the menu control redirects user to

http://mysite/_layouts/MyQuickLinks.aspx

And you probably don't want this to happen, because of following reasons

  • You want to hide My Site from user, but you still want to use My Links feature.
  • You don't want user to navigate away from current site collection when they clicked on the Manage Links menu.
  • You want MyQuickLinks.aspx page to inherit and use current site theme.
  • You are experiencing the MOSS SP1 bug I described in last post.
  • OR you just want to customize it to navigate to the any URL

Goal

The goal here is obvious. To customize the navigate URL of Manage Links. In the example above, user should be redirected to

http://intranet/_layout/MyQuickLinks.aspx

Solution

You'll need following three things to achieve the goal

More...

Oct
4
2008

Unknown Error - Manage Links of My Links

Do you get "Unknown Error" page when you try to access "Manage Links" page from "My Links"? Don't panic.

Many people experienced the same problem after Microsoft Office SharePoint Server SP1 update. The problem was confirmed by Microsoft and hotfix for it has been around for awhile (KB 952294).

Microsoft Help and Support:

You do not have the Create Personal Site permissions in SharePoint Server 2007 Service Pack 1. When you click the Manage Links link, you may receive the following error message:

An unknown error has occurred.

If you are looking for a quick fix, I recommend you go view and request hotfix package from Microsoft. But if you really want to customize Manage Links redirecting URL, in next post I'll show you how to do it without making any changes to master page.

Watch this space