DotNet Development, SharePoint Customizing, Silverlight, MS Infrastructure and other tips and tricks

Posts Tagged ‘Field Types’

MasterPage/PageLayout format DateTimeField

Posted by PANVEGA on March 16, 2009

When you are creating a SharePoint MasterPage or a Page Layout and you what to have a specific datetime format like dd.MM.yyyy  it’s not possible using just the publishing date field of SharePoint. However you can also create a new aspx page with a cs codebehind class and formating the date field, but it is much more offer to achieve this goal (developement, deployment etc.). See the following links below.

Current Situation:

I created a PageLayout with a Custom Content Type DateTime called MyDate field. The field is shown only with this format dd\MM\yyyy. I needed this format dd.MM.yy. Out of the box, you cannot format the date field.  The default date asp code behind look like this:

<SharePointWebControls:DateTimeField FieldName=”MyDate” runat=”server” id=”DateTimeField2″ CssClass=”datetimefield” >
</SharePointWebControls:DateTimeField> Read the rest of this entry »


Posted in Field Types, MasterPage, MOSS | Tagged: , , , | Leave a Comment »

Introduction to User Properties in the SP Central Administration

Posted by PANVEGA on November 5, 2008

User profile properties define a portal user’s individuality. These properties store all essential information, such as contact details, distribution list memberships and colleagues. All can be retrieved from Active Directory and LDAP; from external data sources such as databases and legacy applications; and through the use of the Business Data Catalog (BDC) or from the SharePoint Profiles data store itself.

User profile properties are not limited to those that are created by default during the creation of the Shared Services Provider. Custom profile properties can be created in SharePoint and mapped to AD properties to accommodate situations when Active Directory is being used to track all possible information about a user. But they can be maintained independently of the AD account properties as well.

The set of properties that are included in the user profile might not contain all of the information about users in your organization that you want to include on the site. You can add new properties to enhance those included in the user profile.

You can also edit existing properties to change how those properties are displayed in the user profile.

You can also map properties to properties in Active Directory directory services.

Note When you add or edit a property mapping, you must run a full import before the changes take effect.

My Scenario:

I created a custom people picker field type, where I should retreive some User Properties into a SP List. By default only some fileds are shown in the PickerEntity properties. Hence I have to map some new fields to the user profile through the AD and have to make a full import after the changes (MOSS way). Down below I explained it a little deeper.

Read the rest of this entry »

Posted in Administration, Field Types, Infrastructure, MOSS | Tagged: , , | Leave a Comment »

Display choices using checkboxes in Field Types (multiple selections)

Posted by PANVEGA on October 1, 2008

For Choice fields, this attribute can be set to Dropdown (default), which provides editing options through a drop-down selection, or to RadioButtons, which provides options through a group of radio buttons.

Because this is a choice field, the values are a bit more complicated. The basic format for a field is a single <Field> node. A choice field has the additional sub-nodes of <Default> and <CHOICES>. The <CHOICES> node further has one or more <CHOICE> nodes indicating the individual choices for the field. Read the rest of this entry »

Posted in MOSS | Tagged: , | 2 Comments »

Access Custom Field Type Child Elements Customization

Posted by PANVEGA on August 2, 2008

In this short post I wanna show you how to access the custom field type definitions in the field type xml file. It costs me a lot time to finde a post how to access the child elements.


A field type definition is an XML file named on the pattern fldtypes*.xml that is deployed to the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML. The field types that ship with Windows SharePoint Services 3.0 are located in the FLDTYPES.XML file. Read the rest of this entry »

Posted in MOSS | Tagged: | Leave a Comment »

SP Field Types with more than 255 Characters

Posted by PANVEGA on November 13, 2007


When you add a custom field type that can hold more than the 255 characters you can’t use a field of type SPFieldText because it has a max length of 255 characters.


Your base class Inherits from SPFieldMultiLineText. We are only creating a singleline field, but the SPFieldText base class maps to an nvarchar(255) in the content database.  This would limit the amount of plain text that could be entered to well less than 255.  By using the SPFieldMultiLineText base class, our field is mapped to an ntext in the database.

To limit the user from entering more than 255 characters, we use the MaxLength property on the TextBox in the user control.

To solve this issue you have to do the following steps:

1.  Change the ParentType from Text to Note in you fldtypes_custom.xml file

<Field Name=”TypeName”>MyPeoplePicker</Field>
<Field Name=”ParentType”>Note</Field>
<Field Name=”TypeDisplayName”>Custom PeoplePicker</Field>
<Field Name=”TypeShortDescription”>Custom PeoplePicker</Field>

Represents whether this field type is displayed for inclusion on lists.

The possible values are exactly the same as the possible values for the Type attribute of the Field Element (List – Definition) element. If the field type is not derived from another type, then the value is an empty string:

2. That the real tricky thing, change the SQLType Field in the fldtypes_custom.xml from

<Field Name=”SQLType”>nvarchar</Field>

<Field Name=”SQLType”>ntext</Field>

Optional String. Represents the SQL data type that will be used to store the data in the content database.

However you do not use a <Field Name=”SQLType”> element in your custom field type definitions.

3.  Change the inherits in your base class from SPFieldText to SPFieldMultiLineText

That it, now you see more than 255 Charactres in your Custom Field Type

Read more:

Posted in Field Types, MOSS | Tagged: | 3 Comments »

Introduction in SharePoint Field Types

Posted by PANVEGA on March 28, 2007

DeeThis is the first post of some of theme I am going to write about this topic, and I will use it to introduce in the concept of the custom field types.

In MOSS, and for any list, we can create columns based on a great number of different field types, that let us to work with the information in many different ways. But, some times, we could need something more adapted.

They allow you to create your own subclasses of the existing SharePoint field types. You can control pretty much every aspect of the fields behavior. Things such as how the field is displayed/rendered in the SharePoints interface, how the data is formatted when it gets stored in the field, validation, and all kinds of other cool stuff.

To create a custom field type, you can extend a default Windows SharePoint Services field type by defining a custom field type and control for displaying the field, and then adding a field type definition to register the field type and its control.

Read the rest of this entry »

Posted in ASP.NET, Deployment, DotNet, MOSS, UserControls | Tagged: , , , , | Leave a Comment »

Developing Custom Field Types

Posted by PANVEGA on February 18, 2007

In this post i am going to introduce how to develope a custom field type in 6 steps with the Sharepoint People Picker. Search the name you want, push the button in order to resolve the user enitities in the code behind class. Finnaly return the parsed values to a simple multiline text box. You can also create a datagrid or just a table to format the values.

First of all we are going to create the visual user interface. As the custom field will be deployed as an feature assembly, it is a good idea to create a class library project in Visual Studio 2005 or Visual Studio 2008. Prepare also the folder structure that is required for a feature. Read the rest of this entry »

Posted in ASP.NET, Deployment, DotNet, JavaScript, UserControls, WebParts | Tagged: , , , , , , | Leave a Comment »