Class DataFormContext
Holds the created objects and result data of a form opening operation.
public class DataFormContext : FormContext
- Inheritance
-
DataFormContext
- Inherited Members
- Extension Methods
Properties
DataForm
The created form instance.
public DataForm DataForm { get; }
Property Value
FormDef
The form definition.
public FormDef FormDef { get; }
Property Value
InvalidActions
Form actions the form is not allowed to execute.
public DataFormAction InvalidActions { get; set; }
Property Value
Module
The created module instance.
public DataModule Module { get; }
Property Value
ModuleDef
The module definition
public ModuleDef ModuleDef { get; }
Property Value
RegistryName
The form registration key.
public string RegistryName { get; }
Property Value
RowId
An optional row id, used mainly when the start action is Edit or Delete.
public object RowId { get; set; }
Property Value
StartAction
The first action the form should execute after initialization.
public DataFormAction StartAction { get; set; }
Property Value
Methods
Create(string, Control)
Creates a data form context.
public static DataFormContext Create(string FormRegistryName, Control Caller = null)
Parameters
FormRegistryNamestringThe form registry name.
CallerControlThe caller control.
Returns
- DataFormContext
The created data form context.
Create(string, string, Control)
Creates a data form context.
public static DataFormContext Create(string FormId, string FormRegistryName, Control Caller = null)
Parameters
FormIdstringThe form identifier.
FormRegistryNamestringThe form registry name.
CallerControlThe caller control.
Returns
- DataFormContext
The created data form context.
Create(string, DataModule, Control)
Creates a data form context.
public static DataFormContext Create(string FormRegistryName, DataModule Module, Control Caller = null)
Parameters
FormRegistryNamestringThe form registry name.
ModuleDataModuleThe data module to use.
CallerControlThe caller control.
Returns
- DataFormContext
The created data form context.
CreateForm()
Creates or returns the form instance.
public override AppForm CreateForm()
Returns
- AppForm
The created or existing form instance.
ShowFormModal(string, DataFormAction, object, Control)
Shows a data form in a modal dialog.
public static Task<DataFormContext> ShowFormModal(string FormRegistryName, DataFormAction StartAction = DataFormAction.List, object RowId = null, Control Caller = null)
Parameters
FormRegistryNamestringThe form registry name.
StartActionDataFormActionThe first action the form should execute.
RowIdobjectThe optional row identifier.
CallerControlThe caller control.
Returns
- Task<DataFormContext>
The data form context after the modal dialog is closed.