Showing posts from October, 2011

Using the SharePoint 2010 Modal Dialog

SharePoint 2010 introduces the new dialog framework which helps users stay in context of the page without navigating away from the page. Yes, the modal dialogs that pop up:

The JavaScript client object model provides the SP.UI.ModalDialog class to work with the dialog framework.
In order to work with the dialog framework, we need to first create the dialog options:
var options = SP.UI.$create_DialogOptions(); options.width = 500; options.height = 250; options.url = "/_layouts/StandardsPortal/ChangePassword.aspx"; options.dialogReturnValueCallback = Function.createDelegate( null, portal_modalDialogClosedCallback); As you can see from the above code, we set options on width, height and what is the URL the modal dialog should load. In this case, an Application Page. Notice that we also initialize the callback.
Once the options are set, you can now show the modal dialog:
SP.UI.ModalDialog.showModalDialog(options); Now warp this code into a function:
function po…

Remote Debugging Sharepoint 2010 Solutions

Just spent an unreasonable amount of time getting remote debugging working with Sharepoint 2010 Sandbox *AND* Full-Trust solutions. It took quite a bit of work for me to understand and troubleshoot, so thought I would write it down:
a. for my own future reference
b. so others don’t have to go through the same heartache
The general approach for sandbox and full trust solutions is the same, but they do differ in a few details.
A post by tlhost on the Microsoft Forums titled A SharePoint server is not installed on this computer got me 90% of the way there, this is just filling in the gaps that tripped me up.
And a BIG THANK YOU to Pav – he helped a ton
Export Nodes from Sharepoint Machine Registry Remote to the Sharepoint machine, run regedit and export [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0]
On your development machine, run regedit and import the nodes.
Create Sharepoint project You will now be able to create a Sharepoint Project in Visual…

30+ SharePoint Custom Actions Location and Sample

exampleon how to add Custom Actions to various menus through a SharePoint Feature. The following guide provide complete reference for developer to examine the locations, group IDs and sample screenshots that are used in defining the CustomActionelements of custom actions. Additionally, you can download solution package (WSP) and source codes here: Sky Drive - CustomWare.SharePoint.CustomActionSample.zipPart 2 show examples of custom actions for SharePoint Central Administration Application Management and Operation page. In Part 3, you'll find additional missing custom actions group IDs and locations in MSDN
for Sharepoint Central Administration Shared Service Administration page. Part 2 - SharePoint Central Administration Application Management and Operation pagePart 3 - Sharepoint Central Administration Shared Service Administration pagePer-item edit control block (ECB) menu of document libraryCusto…