Posts

Showing posts from March, 2010

SharePoint Internal Name of Field

You can use the SharePoint function to generate Internal Name from Display Name, but it’s also good if you have a look about the Internal Name of SP Field     Character Internal Hex Code ~ _x007e_ ! _x0021_ @ _x0040_ # _x0023_ $ _x0024_ % _x0025_ ^ _x005e_ & _x0026_ * _x002a_ ( _x0028_ ) ...

How to – SharePoint 2010 – JS client object model and UI advancements

Image
  Ref: http://blogs.msdn.com/vesku/archive/2010/02/25/how-to-sharepoint-2010-js-client-object-model-and-ui-advancements.aspx This blog entry shows how to utilize the new UI functionalities available in the SharePoint 2010 and how to use JavaScript object model to manipulate the site structure. Create initial structure in VS2010 The first step is to create the Visual Studio solution. In this case we will create a new Empty SharePoint project with name ClientOMUIActions .   Since we will be adding Visual Web Part to the project, we will need to use the farm solution option The following step is to add a new Visual Web Part item to the project – let’s name it UIDemo Add dialog integration In this case we need to add the dialog framework integration code to our visual web part, we can definitely use the same model in ribbon buttons, if required. Let’s add the following script element to the Visual Web Part canvas. < script type ="text/java...

How to Display a SharePoint Dialog from Custom Action and Get Selected Item Context

Image
Ref: http://blogs.msdn.com/jfrost/archive/2009/11/08/how-to-display-a-sharepoint-dialog-from-ribbon-button-and-get-selected-item-context.aspx Overview Another really cool new feature in SharePoint 2010 is the new dialog framework provided by the JavaScript client object model.  Inside the new client object model is a JavaScript static class called “ SP.UI.ModalDialog ” that provides a number of helpful methods for working with the dialog framework.  In this blog post, I will discuss the process for displaying a SharePoint Dialog using the client object model and wiring it up to a custom ribbon button and also showing how to get context to selected items in a list or library at the time the ribbon button was clicked. Before I proceed I really must give a shout out to my colleague Elisabeth Olson at Microsoft.  Thanks to her awesome demos and presentations from recent events and conferences, I got a great head start on learning how the client-side dialoging object mod...

Customizing EntityEditorWithPicker

Image
Everyone, who use Sharepoint had seen PeopleEditor control. It very useful in many cases - for example in permission forms: But this control can be used not only for looking for users or groups. You can use its base class EntityEditorWithPicker and extend it to search any data. I will show you very simple example how to do this. We should extend three classes:   using System; using System.Collections.Generic; using System.Text; using Microsoft.SharePoint.WebControls; namespace EntityEditorTest { public class CustomEntityEditor : EntityEditorWithPicker { protected override void OnInit(EventArgs e) { base .OnInit(e); PickerDialogType = typeof (CustomPickerDialog); } public override PickerEntity ValidateEntity(PickerEntity needsValidation...