SPMobileListFieldSelector.TemplateName Property

Gets the name of the preferred <RenderingTemplate> that is used for rendering the field.

Namespace:  Microsoft.SharePoint.MobileControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Overrides ReadOnly Property TemplateName As String
    Get
'Usage
Dim instance As SPMobileListFieldSelector
Dim value As String

value = instance.TemplateName
public override string TemplateName { get; }

Property Value

Type: System.String
A String that specifies the full ID of the <RenderingTemplate> that is used for rendering the field.

Remarks

TemplateName has the following form.

MobileCustomListField_ListTemplateType_FieldType_FieldInternalName

The ListTemplateType is either the integer value of the Type attribute for the Collaborative Application Markup Language (CAML) <ListTemplate Element (List Template)> element or the value of the Name attribute. For example, the Type value for the contacts list template is 105 and its Name value is Contacts, so you can use either "105" or "Contacts" for ListTemplateType.

The FieldType is either a String representation of one of the values of the SPFieldType enumeration or a String representation of the integer equivalent of one of those values. It can also be the ID of a custom field type.

The FieldInternalName is the value of the Name attribute of the Collaborative Application Markup Language (CAML) <Field Element (Field)> element in the list's schema.xml file (located in the list type's subfolder of %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\FEATURES) for the field types that ship with SharePoint Foundation. For custom field types, it is defined in the fldtypes*.xml file for the custom field type.

The following are examples of possible <RenderingTemplate> names that SPMobileListFieldSelector might specify.

MobileCustomListField_105_Text_WorkPhone
MobileCustomListField_Contacts_Text_HomePhone
MobileCustomListField_PictureLibrary_Computed_ImageSize
MobileCustomListField_Posts_DateTime_PublishedDate

If no template with the ID specified by TemplateName is found, the template specified by DefaultTemplateName is used.

See Also

Reference

SPMobileListFieldSelector Class

SPMobileListFieldSelector Members

Microsoft.SharePoint.MobileControls Namespace