Click or drag to resize

CreateControlArgs Class

The event args for the FieldCreateControl event. Typically the extension calls the SetCellType(CellTypes, Int32) method to dynamically specify the CellType for the field. When used in this manner the field object then perform normal control creation and configuration based on that CellTypes. The extension can instead, or also, set the BaseControl to provide a custom WebControl in which case it is the extension's responsibilty to create the control and provide initial configuration.

When determining what CellTypes and/or WebControl to use, the extension should heed the CreationFlags which provide the context for the control's use and, if a control is created by the extension, set that controls's value to the value provided by Value, if any.

See also FieldCreateControl(IField, CreateControlArgs).
Inheritance Hierarchy

Namespace:  NetQuarry.Data
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public class CreateControlArgs : EAPEventArgs

The CreateControlArgs type exposes the following members.

Constructors
  NameDescription
Public methodCreateControlArgs
Complete constructor.
Top
Properties
  NameDescription
Public propertyBaseControl
Set this to provide a WebControl instantiated by the extension. However, unless a custom control is needed, it is better to just set the CellType via SetCellType(CellTypes, Int32) so that the field can apply normal control configuration for the desired CellTypes.
Public propertyBulkContext
Gets/sets the context of the current bulk operation, if any. If this event is part of a bulk operation, this is the context of that bulk operation. If this event is not part of a bulk operation, this context will be null.
(Inherited from EAPEventArgs.)
Public propertyCellType
Initially this is the CellType value of the associated IField. To set this value use SetCellType(CellTypes, Int32) which requires that both the CellType and CellTypeAttributes be set together. The extension can set the CellType and not the BaseControl to have the field object create the control using its normal control creation logic for that CellTypes.
Public propertyCellTypeAttributes
Initially this is the CellTypeAttributes value of the associated IField. To set this value use SetCellType(CellTypes, Int32) which requires that both the CellType and CellTypeAttributes be set together.
Public propertyCreationFlags
These ControlCreationFlags flags specify details about how the control to be created is to be used or presented. For example, ForListEdit specifies that the control is to be used in an editable list.
Public propertyErrorDeveloperMessage
An optional, developer-specific error message. This will be logged to the Devlog and xot_request_log, but only displayed in user error messages when the user is identified as IsDeveloper.
(Inherited from EAPEventArgs.)
Public propertyCode exampleErrorMessage
Sets the extention's error message for this event.
(Inherited from EAPEventArgs.)
Public propertyErrorOptions
Options used to specify additional characteristics about an exception.
(Inherited from EAPEventArgs.)
Public propertyEvent
Gets/Sets the event that is currently executing.
(Inherited from EAPEventArgs.)
Public propertyID
The ID that will be used for the WebControl's ID value. This ID will be used unless a BaseControl is provided with its ID set to another value.
Public propertyResult
Gets/Sets the result to return from the event.
(Inherited from EAPEventArgs.)
Public propertyValue
The initial control value as provided during control creation.
Top
Methods
  NameDescription
Public methodCode exampleCancel
Sets the extention's result code and error message for this event. The result code is set to ExtResultsExtResults.Cancel.
(Inherited from EAPEventArgs.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodCode exampleError(String)
Sets the extention's result code and error message for this event. The result code is set to Error. Use Error(String, String, ExceptionOptions) to include an additional developer message and/or options.
(Inherited from EAPEventArgs.)
Public methodCode exampleError(String, String, ExceptionOptions)
Sets the extention's result code and error message for this event with an optional developer-specific error message and options. The result code is set to Error.
(Inherited from EAPEventArgs.)
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 methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetCellType
The extension will typically call this method to support dynamic control types. This method must be used instead of setting CellType and CellTypeAttributes separately because CellTypeAttributes are interpreted entirely differently depending on the CellType setting making it treacherous to change the CellType without ensuring that the CellTypeAttributes is set accordingly. When the CellType is set, but not the BaseControl, the field object will perform normal control creation and configuration for the specified CellTypes. Generally this is the preferred method for implementing dynamic (per-record) control handling and setting BaseControl should be avoided unless a non-standard control or configuration is required.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
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