IField Methods |
The IField type exposes the following members.
Name | Description | |
---|---|---|
BuildFilter |
Build a filter based on the equality with the field's current rawValue.
| |
BuildFilter(String) |
Build a filter based on the specified comparison operand and the field's current Value.
| |
BuildFilter(String, String) |
Build a filter based on the specified comparison operand and the specified value.
| |
BuildFilter(String, String, FieldFilterFlags) |
Build a filter based on the specified comparison operand, the specified value, and the specified FieldFilterFlags filter building options.
| |
BuildFilter(String, String, FieldFilterFlags, String) |
Build a filter based on the specified comparison operand, the specified value, and the specified FieldFilterFlags filter building options, description provided.
| |
DisplayTextGet |
Get the display text (vs. the underlying raw data in Value). The display text is generated by
applying any picklist and formatting in order to convert the raw value into a string
appropriate for presentation in the UI.
Use DisplayTextSet(String) to set the field's raw value from a diplay text value.
You can use ToDisplayText(Object, ValueConversionFlags) to convert raw value to its display text (with some limitations).
| |
DisplayTextSet |
Sets the field's value from a "pretty" string from the UI applying any picklist and
formatting to parse out the underlying Value.
You can use SetValue(Object, SetValFlags, Object) with the FromDispText combined with with other
SetValFlags for additional control over if and how the value is set.
Use DisplayTextGet(DispTextFlags) to get the field's diplay text value.
You can use ToValue(String, ValueConversionFlags) to convert a display text value to its raw value (with some limitations) without
setting the field value or otherwise affecting the field.
| |
Exec(FieldExecCmds, Enum, Object) |
The Exec method provide extended functionality for fields.
See FieldExecCmds for the enumerated list of commands.
| |
Exec(FieldExecCmds, Int32, Object) |
The Exec method provide extended functionality for fields.
See FieldExecCmds for the enumerated list of commands.
| |
GetValue |
Retrieve the value from the field applying any specified transformations.
If no transformation is required use Value.
| |
HasPermission |
Determines if the field has the specified ObjectPermissions for the current user.
If the object has no assigned permisions, the return value is true.
| |
Init |
Initializes the control bound to the field.
| |
IsAttrSet |
Determines if a particular attribute (or any of a set of attributes) is set.
Note that this is a shorthand for the expression (0 != (field.Attributes & attributes)) (C#)
or (0 <> (field.Attributes Or attributes)) (VB).
| |
Permissions |
Get the ObjectPermissions for the field.
| |
RemovePermissions |
Remove the specified ObjectPermissions from the field.
| |
SetValue |
Set the value of the field. Typically you simply set the field's value by assigning
to Value, but you can use this method if finer control is required. For example,
in order to set the field's value, but not cause it to be marked Dirty as a result you
would call: field.SetValue("the new value", SetValFlags.DoNotMakeDirty, null).
Unless this level of control is required it is recommended that Value be assigned directly.
| |
SQLValue |
Generates a SQL clause with the field's current Value. This clause is appropriate for use in
assigning a value to the field's underlying column and takes column data type into account including
quoting strings and escaping for Unicode on SQL-Server if the underlying column is a wide column.
| |
Supports |
Determines if the field is capable of supporting the specified FieldCapabilities. The type of the field's
underlying column in the database and the field's meta-data are used to determine if the field can provide such support.
| |
ToDisplayText |
Format the provided value as specified in the IAppContext, IField, and user preferences.
This takes into account the IFieldNativeDbType, OleDbType, CellType, Format, etc.
Note that the result will be formatted as it would be if the value were the field's Value and its
display text were obtained via DisplayTextGet(DispTextFlags).
This method is the inverse of ToValue(String, ValueConversionFlags).
| |
ToString |
Override the generic ToString method to warn if the ToString is called directly on the Field object
This is a warning against a fairly common mistake where a developer thinks they are accessing the field's
value property by default, when in fact they are not. This type of problem is known to cause errors when setting
parameters in SQL statements.
| |
ToValue |
Parse the provided text as specified in the IAppContext, IField, and user preferences.
This takes into account the IFieldNativeDbType, OleDbType, CellType, Format, etc.
Note that the result will be parsed as it would be if the field's Value were being set via DisplayTextSet(String).
This method is the inverse of ToDisplayText(Object, ValueConversionFlags).
Note that this method does not set the field's Value. Note also that the method does not use the mapper's operational data from other fields and so, for example, discrim values will not be applied. |
Name | Description | |
---|---|---|
IsCellAttrSet |
Determines if the specified CellTypeAttribute is set on the field.
See CellTypeAttributes for the list of enumerations to use per CellTypes.
A CellTypeAttribute is valid only for a particular CellTypes (since the
bits are reused for other CellTypes), both the CellType
and CellTypeAttributes are checked.
(Defined by FieldInterfaceExtensions.) | |
IsDirty | (Defined by FieldInterfaceExtensions.) | |
IsMissingRequiredValue |
Gets whether or not a required field has a missing value (thus failing requiredness validation) allowing for the IField object being null.
True if field is non-null, field's Required attribute is set and it's value is missing
(generally this means null or an empty string).
(Defined by FieldInterfaceExtensions.) | |
IsRequired |
Gets whether or not the field's Required attribute is set allowing for the IField object being null.
(Defined by FieldInterfaceExtensions.) |