FieldKernel Properties |
The FieldKernel type exposes the following members.
Name | Description | |
---|---|---|
AliasName |
The name of the field in the mapper's view/table. Typically this is the same as the Key.
One use of alias is to map two fields to the same column in the view/table. Obviously in such a
case care must be taken to ensure that there is no data loss due to a user setting both fields to
different values. Typically one or both are locked.
| |
AllowF8 |
Gets whether or not the F8 info page is allowed according to the application's DebugAttrs.NoF8 attribute.
| |
Anomalies |
Gets/sets certain field anomalies. This is primarily intended for internal use.
| |
Application |
The field's application object. The application is obtained
from the mapper if there is a mapper, else from the current
application context.
| |
AssociatedDate |
Gets the DateTime value from the date-only IField associated with this field, if any, (via the TimePicker_DateField property).
When using separate date-only and time-only controls, e.g. DatePicker and TimePicker
fields, in conjunction with one another, the two fields must be associated in order to perform proper TimeZone conversion
with regard to daylight savings time. This gets this field's DateTime value safely even if
there is no such association (in which case DateTime.MinValue.Date is used).
Note that GetAssociatedDate is now preferred because it return null when there is no such date.
| |
AssociatedDateField |
Gets the IField associated with this field, if any, (via the TimePicker_DateField property).
When using separate date-only and time-only controls, e.g. DatePicker and TimePicker
fields, in conjunction with one another, the two fields must be associated in order to perform proper TimeZone conversion
with regard to daylight savings time. Use AssociatedDate to get the field's DateTime value safely even if
there is no such association (in which case DateTime.MinValue.Date is used).
| |
Attributes | FieldAttrs flags specifying various behaviour of the field and apply to all fields.
Additional CellType-specific attributes, per the CellTypes
specified in the field's CellType property, are available via CellTypeAttributes.
Both Attributes and CellTypeAttributes are normally loaded from meta-data during Load and can be set or altered programmatically.
| |
BaseControl |
The WebControl bound to this field. The field may also have a LabelControl associated with it.
| |
Browser |
Gets the BrowserInfo object for the current request.
Note: This object will be null in non-browser contexts.
| |
Caption |
The localized caption for the field. The Caption is typically used for field label text.
For retrieving a caption for the field with additional options, use LabelText
providing LabelFlags.
| |
CellType |
The type of control or use for the field. The CellTypes dictates much of the behaviour
of the field in the UI.
Note that CellType determines the enumeration represented by CellTypeAttributes.
| |
CellTypeAttributes |
CellType-specific attributes dictating the behaviour for the field in a manner
specific to the field's CellType. In addition to these
CellType-specific attributes, Attributes contains FieldAttrs
that apply to all fields regardless of CellType.
Depending on the CellType this property's value will represent attributes from the following enums:
| |
ColumnName |
The name of the field's underlying column in the database. Typically this is the same as the Key.
| |
ColWidth |
The width, in approximate characters, to use for the field in datasheets and other
dynamically generated UI mappers. When zero the field is hidden.
| |
ControlName |
The name of the control to which this field should bind. This is generally the same as the
Key. In dynamically generated pages the ControlName is used as the ID of the dynamically generated
control. In custom contols (ascx) used bound to a mapper, the ControlName may vary from the Key in
order to match the ID of the control on the page.
| |
Database |
The data IDatabase used by the field. The data database holds the field's operational data.
Meta-data is stored in the Repository.
| |
DataSourceType |
The DBMSType of the field's data source.
Normally this is the DBMSType of the DataDB, but if the mapper is using a live
DataTable as its data source then DBMSType.DotNet will be returned.
| |
DataTableColIndex |
Internal use only. Sets the index of this field in the DataTable used for binding.
| |
DataType |
The .Net data type of the field. For example, a string would have a DataType of
"System.String". Note that there is not a one-to-one mapping of .Net data types
to DBMS data types. For example, SQL-Server char, nchar, varchar, nvarchar, text, and
ntext all map to System.String.
| |
DefaultContains |
Gets whether or not filterering on the field should default to "contains" filtering instead of "starts with".
| |
DefaultValue |
The default Value for the field to use when moving to a new record.
| |
Description |
The localized description for the field.
| |
Dirty |
Indicates whether the field's value has changed since loaded by its mapper.
Normally the Dirty flag is set automatically when Value is set programmatically
or due to user action in the UI.
You can set Dirty programmatically if desired.
The Dirty flag is used by the mapper when determining which fields to write during
an UPDATE operation.
To set a field value without making it dirty, use SetValue(Object, SetValFlags, Object).
| |
ExcludeFlavor | ExcludeFlavor is used indicate that a field should be included from any mapper if a corresponding
Flavor is set.
Fields that are excluded are not hidden; they are never loaded into the mapper's Fields collection.
A zero ExcludeFlavor indicates that the field should not be omitted from any mappers (unless specifically
marked for limited inclusion using IncludeFlavor).
If a field is marked as both included and excluded for a particular Flavor then the exclude bit is favored.
| |
FieldBehaviorAttrs |
Gets the FieldBehaviorOptions for this field.
| |
FieldID |
The primary key for the field record in the database. This is unique across all
fields in all mappers. The Key is only unique within a single mapper.
FieldID is a GUID.
| |
FieldLabelOpts |
Gets the LabelOptions for this field.
| |
FilterOptions |
Gets the FilterOptions property for this field.
| |
FindPageInstanceValues |
Get the field's FindPageInstanceValues (PIVs) property removing any optional field
markers (surrounding angle brackets).
| |
Flavor |
The field's flavor (obtained from its mapper if any, else zero).
| |
Format |
Data type-specific format specification instructing the field on how to display its
data and how to parse a value out of user entered text. Most standard .Net formatting
is supported and formatting is locale-appropriate. Additional formatting specifications
are provided to extend those provided by .Net. Examples Here | |
HasPicklist |
Returns true if this field has a picklist.
| |
IncludeFlavor | IncludeFlavor is used indicate that a field should only be included in a mapper if a corresponding
Flavor is set.
Fields that are note included are not hidden; they are never loaded into the mapper's Fields collection.
A zero IncludeFlavor indicates that the field should be loaded into all mappers (unless specifically
for exclusions using ExcludeFlavor).
If a field is marked as both included and excluded for a particular Flavor then the exclude bit is favored.
| |
IsBigInt |
Gets whether or not this field is a big (64-bit) integer field.
| |
IsButtonlike |
Is this field button-like in behaviour?
| |
IsDataDriven |
Is this field data-driven (based primarly on CellType)?
| |
IsFiltering |
Is the field on a mapper being used for filtering (vs. manipulating data)?
| |
IsFinding |
Is the field on a mapper being used for finding (vs. manipulating data)?
| |
IsMobileOrTablet |
Gets whether or not the current browser is for a mobile or table device.
| |
IsSubform |
Is the host page a subform?
| |
IsUTCToLocalDate |
Gets whether or not this field has a timezone spec of the form "0,." meaning store the
date in the database in UTC and display in the user's local timezone.
| |
Key | The unique ID for this field in its mapper.
Generally the Key corresponds to the column name in the mapper's view or table,
to the column name in the underlying table, and the ID of bound controls. These
correlations can be overridden by the field's AliasName,
ColumnName, and ControlName properties respectively.
| |
LabelControl |
The Label control bound to this field based on AssociatedControlID. The field may also have a BaseControl.
| |
Locked |
Indicates whether the field should be locked.
The property evaluates to true if the column locked due to a number of reasons:
| |
Mapper |
The live IMapper object owning this field.
| |
MapperAndFieldKey |
Gets the unique name for the current mapper and field (currently in the format MapperKey.FieldKey).
| |
NativeDbType |
The native data type name for the field's column in the database. For example,
SQL-Server supports the following string data types: char, nchar, varchar, nvarchar,
text, and ntext.
| |
NoBorderWhenLocked |
Determines if, when locked, this field should be displayed without a border.
| |
OldValue | ||
OleDbType |
The field's column's data type in the underlying database as mapped to OleDbType.
The OleDbType is used to determine the way the column can be set, read, filtered
and sorted. For example, the SQL-Server text and ntext data types are mapped to
the corresponding LongVarChar and LongVarWChar, respectively
and in SQL-Server have limited filtering capability and cannot be used to sort.
| |
PageElement |
Gets the PageElementInfo associated with this field's mapper.
| |
Picklist |
The live Picklist object associated with this field.
Picklists are sophisticated vocabulary lists that are used to resolved underlying values to their
display equivalents (e.g. 1=California, 2=New York, 3=Texas, etc.). Picklists values can be specified
using SQL queries, meta-data specified lists, numeric ranges and other platform-provided mechanisms and
even populated programmatically.
| |
PicklistID | ||
Properties |
The field's Properties collection. Properties can be specified in meta-data using the field's
property sheet, or programmatically. Properties are used to specify many aspects of field
appearance and behaviour. The Properties collection is loaded by Load.
| |
Repository | ||
RowLocked |
Specifies whether or not the field should be locked for the current row only. This property is
cleared by the mapper immediately prior to the RowCurrent event. An extension can then set the
property to true to lock this field for that row only. To perform row locking on the entire row
set the RowLocked property. The field will be locked for all the static reasons
(e.g. if the Locked attribute is set), or if the field is row-locked, or if the mapper is row-locked
and the field's IgnoreRowLock behaviour is not set.
Note that the IgnoreRowLock behaviour applies only to mapper-level row locking and has no impact
on field-level row locking.
For row-specific delete control, DeleteLocked.
| |
SecurityAttrs |
Gets the FieldSecurityAttrs for this field.
| |
Table |
The underlying table in which this field's data is stored. By default this is the owner
mapper's View unless the field's Table property overrides that.
In addition, there are two "special" tables, "+" and "-". The "+" and "-" are used to signify a field that has no table (e.g. is ExcludeFromSelect), or for which it is desirable to disassociate the field from its table (e.g. to prevent a dirty value from being saved to the database). The "+" table causes the field to be editable in the UI, assuming the field is not otherwise locked. The "-" table causes the field to be Locked in the UI. | |
TextItems | ||
ToolTip |
The localized tooltip for the field.
Note the tooltip use is affected by the field's ToolTipOptions.
| |
UseBootstrap |
Gets whether or not to render for a Boostrap-base application.
| |
UseLightbox |
Gets whether or not to use a lightbox for inplace Find/MultiFind and similar popups.
| |
Value |
The current value of the field. Setting the Value will set the field's
Dirty flag and cause the previous Value to be copied to the field's OldValue.
The Value is the underlying value of the field as stored (or to be stored)
in the database. In many cases this is the same as the DisplayText.
However, in some cases (e.g. when a Picklist is specified) the Value may
not be the DisplayText. Use the DisplayTextGet(DispTextFlags) and DisplayTextSet(String)
methods to obtain and set the DisplayText. You can use the SetValue(Object, SetValFlags, Object) for
lower-level control when setting the field Value.
| |
Visible |
Indicates whether the field should be visible.
The property evaluates to true if the column width is set to 0 or the field is
hidden due to permissioning or other reasons.
You can set Visible programmatically if desired. Programmatically setting the
field visible will override all other visibility logic except permissioning.
| |
Watermark |
Gets the field's watermark string, if any and if appropriate (e.g. not if filtering).
Null is returned if watermark is not present, or not in use, or blank.
|