Joel's SharePoint Architect Blog

SharePoint 2010, MOSS & WSS Tips and Consultancy Tales

Subscribe Subscribe  View Joel Jeffery's profile on LinkedIn
joelblogs.co.uk | joelj.co.uk | joeljeffery.co.uk | jfdiphoenix.co.uk

I was recently asked how to remove the Editor Parts (Appearance, Layout, Advanced, etc) from custom Web Parts.

One strategy is to implement your own Editor Part and mark the built-in ones as not Visible.

Firstly, we need to create our Editor Part class:

class MyEditorPart : EditorPart
{
    protected override void CreateChildControls()
    {        // this line hides the default EditorParts
        Parent.Controls[2].Visible = false;
        base.CreateChildControls();
    }

    public override bool ApplyChanges()
    {
        // do stuff here
        return true;
    }

    public override void SyncChanges()
    {
        // do stuff here
    }
}

And here’s how we invoke our Editor Part from our Web Part:

Read more on Removing the Default Editor Parts from SharePoint Web Parts…

Technorati Tags: Development, SharePoint, SharePoint 2010 Training, SharePoint Developer, SharePoint Development, WebParts

Joel’s SharePoint Show On Tour!

I’ve put an events calendar showing upcoming SharePoint Show tour dates here: http://joelblogs.co.uk/tour-dates/. I’ve got 10 shows booked in between now and the end of the 2011 in the UK and Sweden, some for SharePoint Administration and some for SharePoint Development.

Drop me a line if you’re interested!

Technorati Tags: SharePoint, SharePoint 2010, SharePoint 2010 Training

SharePoint 2010 in Visual Studio 2010 has made creating Windows Workflow Foundation (WF) workflows an awful lot easier. There are still one or two areas that can be confusing to new developers

One such region of confusion surrounds the Initiation Form – the form displayed whenever a user launches your workflow, that you can use to prompt for more information required to run your workflow. Similar uncertainty surrounds the Association Form – one that is displayed whenever a list administrator attaches your workflow to their list.

Thanks to the tooling in Visual Studio, it’s now easy to add either of these forms. Right-clicking your Workflow item in Solution Explorer and choosing “Add-> New Item” will give you:

Read more on Workflow Initiation and Association Forms in SharePoint 2010: GetInitiationData, Seralize<T>() and Deserialize<T>()…

Technorati Tags: SharePoint, SharePoint 2010, SharePoint 2010 Training, SharePoint Developer

If you’re creating or editing a JavaScript file in Visual Studio and you would like some help creating Client Object Model code, you’re not alone.

It’s a little bit cryptic, but we can tell IntelliSense to include any JavaScript libraries you have on your development machine.

Simply place the following two lines at the top of your source code (watch out for line breaks!):

/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\MicrosoftAjax.js" />
/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.debug.js" />
/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.Core.debug.js" />

Then, you can get IntelliSense when you need it the most!

Read more on Enabling IntelliSense for the JavaScript Client Object Model in SharePoint 2010…

Technorati Tags: Development, SharePoint 2010, SharePoint 2010 Training, SharePoint Developer, SharePoint Training

Stop the Press!

The Google Maps Web Part fir SharePoint 2010 and Office 365 is now free for download complete with source on CodePlex.

Original Blog Post follows

Google Maps Web Part for SharePoint 2010Well, we’ve finally done it!

Our first product is a SharePoint 2010 Web Part that allows you to embed Google Maps in a SharePoint page.

You can use the Web Part in SharePoint Foundation, SharePoint Server (Standard and Enterprise) and even SharePoint Online (Office 365).

It lets you select a centre for the map, and then place a pushpin at a desired location. You can also add a title and label, and control the zoom level and a number of other settings. Not bad for under $20. Smile

Read more on Google Maps Web Part for SharePoint 2010 and Office 365…

Technorati Tags: Development, Mapping, Office 365, SharePoint, SharePoint 2010