Click or drag to resize

Fields Methods

The Fields type exposes the following members.

Methods
  NameDescription
Public methodAdd(IField)
Adds an IField to the collection.
Protected methodAdd(String, Object)
Adds an object to the collection. Override. This method simply calls the Add method with CollectionAddFlags.replace as the flags.
(Inherited from EAPCollectionBase.)
Protected methodAdd(String, Object, CollectionAddFlags)
Adds an item to the collection
(Inherited from EAPCollectionBase.)
Protected methodAddAt
Adds an item to the collection at the specified index. To append an item use -1 or the collection item count as the index.
(Inherited from EAPCollectionBase.)
Public methodAddLabel
Add a label to its associated field. The collection is scanned for a field whose ControlName matches the label's AssociatedControlID. If found, the field's label (LabelControl) is set to reference the label.
Public methodClear
Clears the collection
(Inherited from EAPCollectionBase.)
Public methodContains(Object)
Determines whether an element is in the collection.
(Inherited from EAPCollectionBase.)
Public methodContains(String)
Determines if a field with the specified Key exists in the collection.
Public methodContainsKey
Checks for the existence of an item in the hashtable
(Inherited from EAPCollectionBase.)
Public methodCopyTo
Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array.
(Inherited from EAPCollectionBase.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodField(String)
Retrieves the specified IField object from the collection. Note that, unlike the Fields[Key] indexer, if the field is not found then no entry is logged to the devlog. For finer control over behaviour when the field is not found, use the Find(String, FieldFindType, FindBehaviour) method specifying the desired FindBehaviour.
Public methodField(String, FindBehaviour)
Retrieves the specified IField object from the collection. Note that, unlike the Fields[Key] indexer, if the field is not found no entry is logged to the devlog. For finer control over behaviour when the field is not found, use the Find(String, FieldFindType, FindBehaviour) method specifying the desired FindBehaviour.
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFind(String, FieldFindType)
Searches for a field in the collection based on FieldFindType using OkIfNotFound. See Find(String, FieldFindType, FindBehaviour) for additional details.
Public methodFind(String, FieldFindType, FindBehaviour)
Searches for an IField in the collection based on FieldFindType.

The searchID depends on the findType:

findTypesearchID
ByKeyThe field's Key name IField.Key.
ByCtrlNmThe field's IField.ControlName.
PKFinds the first field marked PK in the collection.
ByAliasFind field by IField.AliasName
UniqueKeyFinds the field marked UniqueKey in the collection (there should be no more than one), if any, else the first field marked PK.
ByCtrlUniqueIdFinds field by it's BaseControl's fully qualified UniqueID
ByFieldIDFinds field by it's GUID (xmt_fields.field_id).
AlternateKeyFinds the field marked AlternateKey, or if no such field and there is exactly one field marked as PK, that field.
Public methodGetBoolValue
Get the value for the specified field, converted to a bool. The behaviour when the field is not found is dictated by the FindBehaviour parameter.
Public methodGetDateTimeValue
Get the value for the specified field, converted to a DateTime. The behaviour when the field is not found is dictated by the FindBehaviour parameter.
Public methodGetDecimalValue
Get the value for the specified field, converted to a decimal. The behaviour when the field is not found is dictated by the FindBehaviour parameter.
Public methodGetDisplayText
The DisplayText (see cref="IField.DisplayTextGet"/>) for the specified field. The behaviour when the field is not found is dictated by the FindBehaviour parameter.
Public methodGetDoubleValue
Get the value for the specified field, converted to a double. The behaviour when the field is not found is dictated by the FindBehaviour parameter.
Public methodGetEnumerator
Returns an enumerator that can iterate through the ArrayList.
(Inherited from EAPCollectionBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetIntValue
Get the value for the specified field, converted to an int. The behaviour when the field is not found is dictated by the FindBehaviour parameter.
Protected methodGetItem(Int32)
Returns an item that matches the specified string index
(Inherited from EAPCollectionBase.)
Protected methodGetItem(String)
Returns an item that matches the specified string index
(Inherited from EAPCollectionBase.)
Public methodGetItemName
Returns the name of the item, a IField.Key
(Overrides EAPCollectionBaseGetItemName(Object).)
Public methodGetStringValue
Get the value for the specified field, converted to a string (without internationalization). The behaviour when the field is not found is dictated by the FindBehaviour parameter.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue(String)
Get the value for the specified field. If the field is not found then an error is raised.
Public methodGetValue(String, Object, FindBehaviour)
Get the value for the specified field, or the defaultValue if not found. The behaviour when the field is not found is dictated by the FindBehaviour parameter.
Public methodIndexOf
Returns the zero-based index of the first occurrence of an object in the internal ArrayList or in a portion of it.
(Inherited from EAPCollectionBase.)
Public methodIndexOfKey
Returns the index of the item in the collection (by key)
(Inherited from EAPCollectionBase.)
Public methodInsert
Inserts an element into the internal ArrayList at the specified index
(Inherited from EAPCollectionBase.)
Protected methodIsMarkedForDeletion
Determines if this element is marked for deletion. Note that this base implementation must be overridden in order to support RemoveMarkedItems() for a partular collection.
(Inherited from EAPCollectionBase.)
Protected methodIsTypeOK
Verifies the item is an acceptable type. Generally this is a test like "return (item is [class]);".
(Overrides EAPCollectionBaseIsTypeOK(Object).)
Public methodKeyList
Extracts the keys for the fields in the collection as a semi-colon separated list.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNotify
Send a notification to all fields in the collection.
Protected methodRecalcHash
Recalculates the internal hash
(Inherited from EAPCollectionBase.)
Public methodRemove(Object)
Removes the first occurrence of a specific object from the collection
(Inherited from EAPCollectionBase.)
Public methodRemove(String)
Remove the specified item from the collection.
(Inherited from EAPCollectionBase.)
Public methodRemoveAt
Removes the element at the specified index
(Inherited from EAPCollectionBase.)
Public methodRemoveMarkedItems
Removes the properties marked for deletion.
(Inherited from EAPCollectionBase.)
Public methodRemoveRange
Removes the element at the specified index
(Inherited from EAPCollectionBase.)
Protected methodSetItem(Int32, Object)
Sets an item's value at the specified index.
(Inherited from EAPCollectionBase.)
Protected methodSetItem(String, Object)
Sets an item's value at the string index indicated by the parameters.
(Inherited from EAPCollectionBase.)
Public methodSetValue(String, Object)
Set the value for the specified field. If the field is not found, an error is raised.
Public methodSetValue(String, Object, SetValFlags, FindBehaviour)
Set the value for the specified field per the provided SetValFlags. Behaviour in the case where the specified field is not found in the collection is dictated by FindBehaviour.
Public methodSort(Boolean)
Sort the list by its key value.
(Inherited from EAPCollectionBase.)
Public methodSort(IComparer)
Sort the collection using the provided comparer.
(Inherited from EAPCollectionBase.)
Public methodSort(String)
Sorts the Fields collection in the order specified by the provided semi-colon-separated list of field keys. Fields not in the provided sort list retain their relative positions, but following all explicitly ordered fields. The list is handled case-insensitively, but may provide slightly better performance if provided in all lower-case.
Public methodSubset
Obtain a Fields collection with a subset of this collection's IField objects. The criteria for determining which fields to include in the subset is specified using FieldSubsetType:
  • AttributeIsSet - Get the subset of fields where any of the specified set of FieldAttrs, provided in criteria, is set.
  • ByCellType - Find all fields whose CellTypes matches the criteria.
  • RowKeys - Get the subset of fields comprising the RowKeys for the mapper (criteria ignored).
  • PropSet - Get the subset of fields where the specified property value, provided as a string in criteria, is not null/blank.
  • Visible - Get the subset of fields with the specified Visible value, provided as a boolean in criteria.
  • Dirty - Get the subset of fields with the specified Dirty value, provided as a boolean in criteria..
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodTruncate
Truncate the array starting at the specified index.
(Inherited from EAPCollectionBase.)
Protected methodUnload
Called when the collection is cleared allowing a derived class to clean up.
(Inherited from EAPCollectionBase.)
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also