GenericForm<TModel> Class

public class GenericForm<TModel> : ComponentBase

Type parameters

TModel

No documentation is available.

Inheritance
ComponentBase GenericForm<TModel>

Constructors

NameDescription
GenericForm()

GenericForm()

GenericForm.razor
public GenericForm()

No documentation is available.

Properties

NameDescription
EditorClassGets or sets the CSS class to apply to editor elements.
EnableFieldValidationGets or sets whether to display field validation messages. Default is true.
FieldTemplateGets or sets a custom template for rendering each field. If not specified, a default template is used.
ModelGets or sets the model instance to edit in the form.
ModelChangedGets or sets the callback invoked when any field value changes.

Gets or sets the CSS class to apply to editor elements.

public string? EditorClass { get; set; }

Property value

string?

EnableFieldValidation

GenericForm.razor

Gets or sets whether to display field validation messages. Default is true.

public bool EnableFieldValidation { get; set; }

Property value

bool

FieldTemplate

GenericForm.razor

Gets or sets a custom template for rendering each field. If not specified, a default template is used.

public RenderFragment<GenericFormField<TModel>>? FieldTemplate { get; set; }

Gets or sets the model instance to edit in the form.

public TModel? Model { get; set; }

Property value

TModel?

ModelChanged

GenericForm.razor

Gets or sets the callback invoked when any field value changes.

public EventCallback<TModel> ModelChanged { get; set; }

Property value

EventCallback<TModel>

Methods

NameDescription
BuildRenderTree(RenderTreeBuilder)
OnParametersSet()

BuildRenderTree(RenderTreeBuilder)

GenericForm.razor
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

No documentation is available.

OnParametersSet()

GenericForm.razor
protected override void OnParametersSet()

No documentation is available.