Class FieldDef
A field definition
public class FieldDef : BaseDef, IDef, IJsonLoadable, INotifyPropertyChanged
- Inheritance
-
FieldDef
- Implements
- Inherited Members
- Extension Methods
Constructors
FieldDef()
Constructor
public FieldDef()
FieldDef(TableDef)
Constructor
public FieldDef(TableDef TableDef)
Parameters
TableDefTableDef
Properties
Alias
An alias of this field
public string Alias { get; set; }
Property Value
CodeProvider
Gets or sets the Name of the code producer descriptor associated to this field.
public string CodeProvider { get; set; }
Property Value
DataType
The data type of this field.
public DataFieldType DataType { get; set; }
Property Value
Decimals
Gets or sets the decimals of the field. Used when is a float field. -1 means is not set.
public int Decimals { get; set; }
Property Value
DefaultValue
Gets or sets the default value of the field.
public string DefaultValue { get; set; }
Property Value
DisplayFormat
Gets or sets the format string to be used for displaying the field value.
public string DisplayFormat { get; set; }
Property Value
DisplayWidth
Gets or sets the width of the field in pixels. 0 means is not set.
public int DisplayWidth { get; set; }
Property Value
EditFormat
Gets or sets the format string to be used for editing the field value.
public string EditFormat { get; set; }
Property Value
Expression
Gets or sets the expression of the field.
public string Expression { get; set; }
Property Value
Flags
Gets or sets the field flags.
public FieldFlags Flags { get; set; }
Property Value
Group
The group the field should be displayed into, e.g. General, Address, Billing, etc.
public string Group { get; set; }
Property Value
IsBindable
Returns true when this field is a bindable one, i.e. is visible and is not a blob
[JsonIgnore]
public bool IsBindable { get; }
Property Value
IsBlob
Returns true when the data type is a blob type.
[JsonIgnore]
public bool IsBlob { get; }
Property Value
IsBoolean
Returns true when the Boolean flag is set in Flags.
[JsonIgnore]
public bool IsBoolean { get; }
Property Value
IsDateTime
Returns true when the data type is a date type.
[JsonIgnore]
public bool IsDateTime { get; }
Property Value
IsExtraField
Returns true when the Extra flag is set in Flags.
[JsonIgnore]
public bool IsExtraField { get; }
Property Value
IsFloat
Returns true when the data type is a float type.
[JsonIgnore]
public bool IsFloat { get; }
Property Value
IsForeignKeyField
Returns true when the ForeignKey flag is set in Flags.
[JsonIgnore]
public bool IsForeignKeyField { get; }
Property Value
IsHidden
Returns true when the Hidden flag is set in Flags.
[JsonIgnore]
public bool IsHidden { get; }
Property Value
IsImage
Returns true when the Image flag is set in Flags.
[JsonIgnore]
public bool IsImage { get; }
Property Value
IsImagePath
Returns true when the ImagePath flag is set in Flags.
[JsonIgnore]
public bool IsImagePath { get; }
Property Value
IsInteger
Returns true when the data type is an integer type.
[JsonIgnore]
public bool IsInteger { get; }
Property Value
IsLargeMemo
Returns true when the LargeMemo flag is set in Flags.
[JsonIgnore]
public bool IsLargeMemo { get; }
Property Value
IsLocator
Returns true when this field is a locator field.
[JsonIgnore]
public bool IsLocator { get; }
Property Value
IsLookup
Returns true when this field is a lookup field.
[JsonIgnore]
public bool IsLookup { get; }
Property Value
IsMemo
Returns true when the Memo flag is set in Flags.
[JsonIgnore]
public bool IsMemo { get; }
Property Value
IsNativeField
Returns true when the Extra flag is NOT set in Flags.
[JsonIgnore]
public bool IsNativeField { get; }
Property Value
IsNoInsertOrUpdate
Returns true when the NoInsertUpdate flag is set in Flags.
[JsonIgnore]
public bool IsNoInsertOrUpdate { get; }
Property Value
IsNullable
Gets or sets a value indicating whether this field is nullable.
public bool IsNullable { get; set; }
Property Value
IsNumeric
Returns true when the data type is a numeric type.
[JsonIgnore]
public bool IsNumeric { get; }
Property Value
IsReadOnly
Returns true when the ReadOnly flag is set in Flags.
[JsonIgnore]
public bool IsReadOnly { get; }
Property Value
IsReadOnlyEdit
Returns true when the ReadOnlyEdit flag is set in Flags.
[JsonIgnore]
public bool IsReadOnlyEdit { get; }
Property Value
IsReadOnlyUI
Returns true when the ReadOnlyUI flag is set in Flags.
[JsonIgnore]
public bool IsReadOnlyUI { get; }
Property Value
IsRequired
Returns true when the Required flag is set in Flags.
[JsonIgnore]
public bool IsRequired { get; }
Property Value
IsSearchable
Returns true when the Searchable flag is set in Flags.
[JsonIgnore]
public bool IsSearchable { get; }
Property Value
IsVisible
Returns true when the Hidden flag is NOT set in Flags.
[JsonIgnore]
public bool IsVisible { get; }
Property Value
Locator
Gets or sets the name of the locator descriptor associated to this field.
public string Locator { get; set; }
Property Value
LookupSource
Gets or sets the name of the lookup source descriptor associated to this field.
public string LookupSource { get; set; }
Property Value
MaxLength
Gets or sets the maximum length of the field. -1 means is not set.
public int MaxLength { get; set; }
Property Value
SnapshotOf
Gets or sets the source field whose value is stored as a snapshot in this field.
Expected format: TableName.FieldName, for example Product.Code.
public string SnapshotOf { get; set; }
Property Value
TableDef
The master definition this instance belongs to.
[JsonIgnore]
public TableDef TableDef { get; set; }
Property Value
ToolTip
Gets or sets the ToolTip text of the field.
public string ToolTip { get; set; }
Property Value
Methods
AddFlags(FieldFlags)
Adds the Flags and returns this instance.
public FieldDef AddFlags(FieldFlags Value)
Parameters
ValueFieldFlags
Returns
CheckDescriptor()
Throws an exception if this descriptor is not fully defined
public override void CheckDescriptor()
GetTitleKey()
Overrides GetTitleKey() to return the Alias of this field if this is a field of a join table.
protected override string GetTitleKey()
Returns
SetAlias(string)
Sets the Alias and returns this instance.
public FieldDef SetAlias(string Value)
Parameters
Valuestring
Returns
SetCodeProviderName(string)
Sets the CodeProvider and returns this instance.
public FieldDef SetCodeProviderName(string Value)
Parameters
Valuestring
Returns
SetDecimals(int)
Sets the Decimals and returns this instance.
public FieldDef SetDecimals(int Value)
Parameters
Valueint
Returns
SetDefaultValue(string)
Sets the DefaultValue and returns this instance.
public FieldDef SetDefaultValue(string Value)
Parameters
Valuestring
Returns
SetExpression(string)
Sets the Expression and returns this instance.
public FieldDef SetExpression(string Value)
Parameters
Valuestring
Returns
SetFlags(FieldFlags)
Sets the Flags and returns this instance.
public FieldDef SetFlags(FieldFlags Value)
Parameters
ValueFieldFlags
Returns
SetGroup(string)
Sets the Group and returns this instance.
public FieldDef SetGroup(string Value)
Parameters
Valuestring
Returns
SetLargeMemo()
Sets the LargeMemo FieldFlags flag and returns this instance."
public FieldDef SetLargeMemo()
Returns
SetMaxLength(int)
Sets the MaxLength and returns this instance.
public FieldDef SetMaxLength(int Value)
Parameters
Valueint
Returns
SetMemo()
Sets the Memo FieldFlags flag and returns this instance."
public FieldDef SetMemo()
Returns
SetNullable(bool)
Sets the SetNullable(bool) and returns this instance.
public FieldDef SetNullable(bool Value)
Parameters
Valuebool
Returns
SetSnapshotOf(string)
Sets the SnapshotOf and returns this instance.
public FieldDef SetSnapshotOf(string Value)
Parameters
Valuestring
Returns
SetTitleKey(string)
Sets the TitleKey and returns this instance.
public FieldDef SetTitleKey(string Value)
Parameters
Valuestring
Returns
ToString()
Returns a string representation of this instance.
public override string ToString()