Class FieldBase<FieldType>
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
Form field base class
public abstract class FieldBase<FieldType> : AbstractDataContainer<FieldType>, IDataContainer, ISimpleDataContainer, IField, IDataDefinitionItem where FieldType : FieldBase<FieldType>
Type Parameters
FieldType
- Inheritance
-
objectAbstractSimpleDataContainer<FieldType>AbstractDataContainer<FieldType>FieldBase<FieldType>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
FieldBase()
Constructor.
protected FieldBase()
Properties
AllowEmpty
Indicates whether field allows null values.
public bool AllowEmpty { get; set; }
Property Value
- bool
Caption
Column caption.
public string Caption { get; set; }
Property Value
- string
DataType
Data type.
public string DataType { get; set; }
Property Value
- string
DefaultValue
Field default value.
public string DefaultValue { get; set; }
Property Value
- string
External
Indicates if field is external, if so it represents column from another table which is included in CMS_Tree_View_Joined (CMS_Document, CMS_Node, ...).
[Obsolete("Property is deprecated and will be removed in the next version.")]
[ObsoleteSince(28, 0)]
public bool External { get; set; }
Property Value
- bool
Guid
Field unique identifier.
public Guid Guid { get; set; }
Property Value
- Guid
IsDummyField
Indicates that field has no representation in database.
public bool IsDummyField { get; set; }
Property Value
- bool
IsDummyFieldFromMainForm
If true the field was added into the main form else it was added into the alt.form (expects IsDummyField property to be true).
public bool IsDummyFieldFromMainForm { get; set; }
Property Value
- bool
IsInherited
If true, the field is inherited from parent class.
[Obsolete("Property is deprecated and will be removed in the next version.")]
[ObsoleteSince(28, 0)]
public bool IsInherited { get; set; }
Property Value
- bool
IsUnique
Indicates whether field is unique.
public bool IsUnique { get; set; }
Property Value
- bool
Name
Column name.
public string Name { get; set; }
Property Value
- string
Precision
Precision of the field
public int Precision { get; set; }
Property Value
- int
PrimaryKey
Indicates whether field is a primary key.
public bool PrimaryKey { get; set; }
Property Value
- bool
Properties
Properties of the field
public Hashtable Properties { get; set; }
Property Value
- Hashtable
PropertiesMacroTable
Macro table for the field properties.
public Hashtable PropertiesMacroTable { get; set; }
Property Value
- Hashtable
ReferenceToObjectType
ObjectType to which the given field refers (for example as a foreign key).
public string ReferenceToObjectType { get; set; }
Property Value
- string
ReferenceType
Type of the reference (used only when ReferenceToObjectType is set).
public ObjectDependencyEnum ReferenceType { get; set; }
Property Value
Size
Size of the field.
public int Size { get; set; }
Property Value
- int
System
Indicates if field is a system field.
public bool System { get; set; }
Property Value
- bool
Methods
Clone()
Clones the object.
public virtual IDataDefinitionItem Clone()
Returns
- IDataDefinitionItem
Returns clone of FormFieldInfo
GetXmlNode(XmlDocument)
Returns the XML node representing the FormFieldInfo object.
public virtual XmlNode GetXmlNode(XmlDocument doc)
Parameters
doc
XmlDocumentXML document
Returns
- XmlNode
LoadFromTableData(DataRow, bool, bool)
Loads the field info from plain database structure data.
public virtual void LoadFromTableData(DataRow row, bool isPrimary, bool isSystem)
Parameters
row
DataRowData row with structure information
isPrimary
boolIndicates if field represents primary key
isSystem
boolIndicates if field is system field
Remarks
Database structure data can be obtained via GetColumnInformation(string, string).
LoadFromXmlNode(XmlNode)
Loads the field info from XML node
public virtual void LoadFromXmlNode(XmlNode fieldNode)
Parameters
fieldNode
XmlNodeField node
RegisterColumns()
Registers the Columns of this object for resolving data macros.
protected override void RegisterColumns()
ToString()
Returns field name value.
public override string ToString()
Returns
- string