Click or drag to resize

IField Methods

The IField type exposes the following members.

Methods
  NameDescription
Public methodBuildFilter
Build a filter based on the equality with the field's current rawValue.
Public methodBuildFilter(String)
Build a filter based on the specified comparison operand and the field's current Value.
Public methodBuildFilter(String, String)
Build a filter based on the specified comparison operand and the specified value.
Public methodBuildFilter(String, String, FieldFilterFlags)
Build a filter based on the specified comparison operand, the specified value, and the specified FieldFilterFlags filter building options.
Public methodBuildFilter(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.
Public methodDisplayTextGet
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).
Public methodDisplayTextSet
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.
Public methodExec(FieldExecCmds, Enum, Object)
The Exec method provide extended functionality for fields. See FieldExecCmds for the enumerated list of commands.
Public methodExec(FieldExecCmds, Int32, Object)
The Exec method provide extended functionality for fields. See FieldExecCmds for the enumerated list of commands.
Public methodGetValue
Retrieve the value from the field applying any specified transformations. If no transformation is required use Value.
Public methodHasPermission
Determines if the field has the specified ObjectPermissions for the current user. If the object has no assigned permisions, the return value is true.
Public methodInit
Initializes the control bound to the field.
Public methodIsAttrSet
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).
Public methodPermissions
Get the ObjectPermissions for the field.
Public methodRemovePermissions
Remove the specified ObjectPermissions from the field.
Public methodSetValue
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.
Public methodSQLValue
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.
Public methodSupports
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.
Public methodToDisplayText
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).
Public methodToString
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.
Public methodToValue
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.

Top
Extension Methods
  NameDescription
Public Extension MethodIsCellAttrSet
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.)
Public Extension MethodIsDirty
Gets whether or not the field is Dirty allowing for the IField object being null.
(Defined by FieldInterfaceExtensions.)
Public Extension MethodIsMissingRequiredValue
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.)
Public Extension MethodIsRequired
Gets whether or not the field's Required attribute is set allowing for the IField object being null.
(Defined by FieldInterfaceExtensions.)
Top
See Also