SPColumn Type
The column type is used while altering the schema of Lists.
Remarks
For specific information relating to the storage and use of List metadata in SharePoint, please refer to the SharePoint Documentation.
Fields
ColumnName String |
The internal name SharePoint gives to the column. This field is readonly. | ||||||
ColumnType String |
The type of the column. | ||||||
DisplayName String |
The name that will be displayed while viewing Lists in SharePoint. DisplayName is different from the actual schema column name of the List, which is provided by Name. | ||||||
FromBaseType boolean |
This flag is used to indicate whether the column is derived from a base type of the parent site. | ||||||
Hidden boolean |
Indicates whether or not the current column is hidden. | ||||||
MaxLength int |
The maximum data length for the column. This value varies depending on the type specified in ColumnType. If MaxLength is not specified, the default value specified in the schema is used instead. | ||||||
Name String |
The schema name for the column. This is used internally in SharePoint Lists. To set the actual visible name of the column, please refer to DisplayName. NOTE: This field is required when adding a column to the site or list. | ||||||
PrimaryKey boolean |
If PrimaryKey is set to true, the column will be used as a primary key. | ||||||
RawXML String |
The raw XML content for the column description. This value may be used to define custom column types.
Example:
Column col = new Column(); col.RawXML = "<Field Name=\"new column\" Type=\"My Type\" OtherField=\"Other Value\" />"; SiteControl.Columns.Add(col); SiteControl.AddColumns("MyList"); NOTE: When using this field to send custom xml for the specified column, do not set any other fields for this column after setting the value for RawXML. When another field is set, the bean will automatically regenerate the xml for this column before sending the information to the server. | ||||||
ReadOnly boolean |
The ReadOnly field will mark the column as read-only so its contents cannot be modified. | ||||||
Required boolean |
If the required property is set to true, the column must have a value. | ||||||
UpdateOp int |
The operation to apply to the current column. This is only valid when updating the columns on the list or site. Possible values include:
|
Constructors
public SPColumn();
public SPColumn(String name, String displayName);
public SPColumn(String name, String displayName, String columnType);
public SPColumn(String name, String displayName, boolean primaryKey);
public SPColumn(String name, String displayName, String columnType, boolean primaryKey);