Table of Contents

Class DataFormContext

Namespace
Tripous.Desktop
Assembly
Tripous.Desktop.dll

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

DataForm

FormDef

The form definition.

public FormDef FormDef { get; }

Property Value

FormDef

InvalidActions

Form actions the form is not allowed to execute.

public DataFormAction InvalidActions { get; set; }

Property Value

DataFormAction

Module

The created module instance.

public DataModule Module { get; }

Property Value

DataModule

ModuleDef

The module definition

public ModuleDef ModuleDef { get; }

Property Value

ModuleDef

RegistryName

The form registration key.

public string RegistryName { get; }

Property Value

string

RowId

An optional row id, used mainly when the start action is Edit or Delete.

public object RowId { get; set; }

Property Value

object

StartAction

The first action the form should execute after initialization.

public DataFormAction StartAction { get; set; }

Property Value

DataFormAction

Methods

Create(string, Control)

Creates a data form context.

public static DataFormContext Create(string FormRegistryName, Control Caller = null)

Parameters

FormRegistryName string

The form registry name.

Caller Control

The 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

FormId string

The form identifier.

FormRegistryName string

The form registry name.

Caller Control

The 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

FormRegistryName string

The form registry name.

Module DataModule

The data module to use.

Caller Control

The 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

FormRegistryName string

The form registry name.

StartAction DataFormAction

The first action the form should execute.

RowId object

The optional row identifier.

Caller Control

The caller control.

Returns

Task<DataFormContext>

The data form context after the modal dialog is closed.