Type (as shown on the Create Column page) Field Type Notes MSDN Links
Single line of text Type=”Text”   Microsoft.Sharepoint.SPFieldText
Multiple lines of text Type=”Note” In the Create Column page, can pick the type of text to allow. To enable the different sub-types, you need to set a couple of other attributes on the field element.

Plain Text
RichText=”FALSE”  (default value)

Rich Text
RichText=”TRUE”
RichTextMode=”Compatible”  (default value)

Enhanced Text
RichText=”TRUE”
RichTextMode=”FullHtml”

In addition, you can also set the number of lines to display using the NumLine attribute.

Further Information on MSDN:

Microsoft.Sharepoint.SPFieldMultiLineText
Choice (menu to choose from) Single Choice
Type=”Choice”

Multi-Choice
Type=”MultiChoice"

Pick the display format for the Choice and Multi-Choice types, respectively:

Drop-Down Menu or Combo Box
Format=”Dropdowns”

Radio Buttons or Check Boxes
Format=”RadioButtons”

Define the options a user can pick from using the Choices element. Below is a skeleton to explain this.

<Field Name=”MyOptions” Type=……>
  <CHOICES>
     <CHOICE>Option 1</CHOICE>
     <CHOICE>Option 2</CHOICE>
  </CHOICES>
</Field>

If you would like to give the user an option to add their own value, set the attribute FillInChoice=”TRUE”.

Microsoft.Sharepoint.SPFieldChoice
Microsoft.Sharepoint.SPFieldMultiChoice
Number Type=”Integer” This field type also lets you define:

Minimum Value (0 for example)
Min=”0”

Maximum Value (100 for example)
Max=”100”

Decimal Places (Default is Automatic, example 2 decimal places)
Decimals=”2”

Show as Percentage (Default is False)
Percentage=”FALSE”

Microsoft.SharePoint.SPFieldNumber

Currency Type=”Currency” This field type also lets you define:

Minimum Value (0 for example)
Min=”0”

Maximum Value (100 for example)
Max=”100”

Decimal Places (Default is Automatic, example 2 decimal places)
Decimals=”2”

Currency Format
This sets the display format of the currency.

LCID=”3081”

3081 sets the format English – Australian. For a complete list of Locales, see the MSDN link in the next column.

Microsoft.Sharepoint.SPFieldCurrency

Locale IDs

Date and Time Type=”DateTime” This field also lets you define:

Date and Time Format
Show the date only:
Format=”DateOnly”

Show the date and time:
Format=”DateTime”

Microsoft.Sharepoint.SPFieldDateTime
Yes/No Type=”Boolean” When setting the default value, you need to use the binary values:

No/False = 0
Yes/True = 1

Microsoft.Sharepoint.SPFieldBoolean
Person or Group Single User or Group
Type=”User”

Multiple Users or Groups
Type=”MultiUser”

This field also lets you define:

Allow multiple selections 
Set the Type to MultUser and the attribute Mult=”TRUE”

Allow selection of
People Only
UserSelectionMode=”PeopleOnly”

People and Groups
UserSelectionMode=”PeopleAndGroups”

Choose from
If you want to limit the option list to a SharePoint Group, use the UserSelectionScope attribute. Set it to the ID of the SharePoint group (Integer value). For example, UserSelectionScope=”3”.

Show field
Set the name of the field from the User’s profile properties that you want to display. For example, show the user’s name property:
ShowField=”Name”

If you would also like to show presence (Office Communicator integration required):
Presence=”TRUE”

Microsoft.Sharepoint.SPFieldUser
Hyperlink or Picture Type=”URL” You can display the URL as a Hyperlink or Picture. Use the Format attribute to pick which one:

Hyperlink
Format=”Hyperlink”

Picture
Format=”Image”

share point 字段类型的更多相关文章

  1. Oracle修改字段类型方法总结

    有一个表名为tb,字段段名为name,数据类型nchar(20). 1.假设字段数据为空,则不管改为什么字段类型,可以直接执行:alter table tb modify (name nvarchar ...

  2. 关于SubSonic3.0插件使用SubSonic.Query.Select查询时,字段类型为tinyint时列丢失问题的Bug修复

    下午在写代码时,突然发现一个列名为Enable的字段怎么也查询不出来,开始以为可能这个名称是关键字,所以给过滤掉了,所以就将名称修改为IsEnable,问题还是一样......将名称又改为IsEnab ...

  3. Django model字段类型清单

    转载:<Django model字段类型清单> Django 通过 models 实现数据库的创建.修改.删除等操作,本文为模型中一般常用的类型的清单,便于查询和使用: AutoField ...

  4. SQL常用字段类型

    中文常用字段类型 1.   名称类    nvarchar(10) 2.   数量       int 3.   时间      date 4.   货币      money 5.   编号     ...

  5. SQL数据库中字段类型 与C#中的对应字段类型

    数据库中的字段类型和对应的C#中的对应字段类型 数据库                 C#程序int int32text stringbigint int64binary System.Byte[] ...

  6. Solr内置的字段类型

    字段类型在org.apache.solr.schema包下 Class 描述 BCDIntField 二进制整形字段 BCDLongField 二进制长整形字段 BCDStrField 二进制字符型字 ...

  7. django:field字段类型

    字段类型(Field types) AutoField 它是一个根据 ID 自增长的 IntegerField 字段.通常,你不必直接使用该字段.如果你没在别的字段上指定主 键,Django 就会自动 ...

  8. mongodb字段类型转化

    最近在使用mongoDB, 发现mongo对字段类型的定义并不是很严格,完全依赖传入数据的类型,在加上PHP是弱类型的语言,所以难免会出现一些错误.如果预想的类型是Int型,但数据存储的是String ...

  9. sqlserver字段类型

    bit    整型 bit数据类型是整型,其值只能是0.1或空值.这种数据类型用于存储只有两种可能值的数据,如Yes 或No.True 或False .On 或Off. 注意:很省空间的一种数据类型, ...

随机推荐

  1. 批量生成xml文件数据C#实现

    方法一 // < Records count = "5" > //< Record > // < Contact_ID > 5 - 55W - ...

  2. python学习之数据类型(set)

    3.9 集合(set) 3.9.1 介绍 ​ 集合是一个无序且不重复的元素集合.元素必须是可哈希的(int,str,tuple,bool).可以把它看作是dic的key的集合.用{}表示. ​ 注意: ...

  3. python基础语法之集合set

    1 概念 集合是一个无需的,不重复的数组组合,它的主要作用如下: 去重,将一个列表装换成集合,会将其去重 关系测试,测试两组数据的交集,差集,并集等关系. 集合对象是一组无需排列的可哈希的值,集合成员 ...

  4. 【机器学习】聚类算法:层次聚类、K-means聚类

    聚类算法实践(一)--层次聚类.K-means聚类 摘要: 所谓聚类,就是将相似的事物聚集在一 起,而将不相似的事物划分到不同的类别的过程,是数据分析之中十分重要的一种手段.比如古典生物学之中,人们通 ...

  5. 【VS开发】VC实现程序重启的做法

    转载地址:http://blog.csdn.net/clever101/article/details/9327597 很多时候系统有很多配置项,修改了配置项之后能有一个按钮实现系统重启.所谓重启就是 ...

  6. python 列表的(总结)

    列表(自我总结) 1.在python中什么是列表 列:排列,表:一排数据 在python中的表达就是 l = [1,2,3,4,5,6,7] 2.列表是可变类型还是不可变类型 也就是说列表能不能被ha ...

  7. LPVOID 指针 转 int

    1 DWORD  WINAPI  SockUDP::RecvThread(LPVOID lparam){   //套接字  正确:int sock= *(int*)(lparam);   错误:int ...

  8. MySQL_基础

    ## 数据库的基本概念 1. 数据库的英文单词: DataBase 简称 : DB 2. 什么数据库? * 用于存储和管理数据的仓库. 3. 数据库的特点: 1. 持久化存储数据的.其实数据库就是一个 ...

  9. 【6.12校内test】T3 城市交通费

    要不我先去写T2吧(逃 先把题目搞上来: [问题描述] 有 n 个城市,编号 1~n.其中 i 号城市的繁华度为 pi.省内有 m 条可以双向同行的高速 公路,编号 1~m.编号为 j 的高速公路连接 ...

  10. 02:Redis常见面试题

    1.1 redis基础面试题 1.什么是Redis?简述它的优缺点? 1. Redis本质上是一个Key-Value类型的内存数据库,很像memcached. 2. 整个数据库统统加载在内存当中进行操 ...