New to Telerik UI for BlazorStart a free 30-day trial

Definition

Namespace:Telerik.Blazor.Components.Common.Grid.EditForm

Assembly:Telerik.Blazor.dll

Type Parameters:

TItem

Syntax:

C#
public abstract class TableEditForm<TItem> : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTableEditForm<TItem>

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.BuildRenderTree(RenderTreeBuilder)ComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)...

Constructors

C#
protected TableEditForm()

Methods

C#
protected Task Cancel()
Returns:

Task

C#
public bool IsValid()
Returns:

bool

C#
protected Task OnEditorChange(object newValue)
Parameters:newValueobjectReturns:

Task

C#
public override Task SetParametersAsync(ParameterView parameters)
Parameters:parametersParameterViewReturns:

Task

Overrides: ComponentBase.SetParametersAsync(ParameterView)

C#
public Task TriggerCommand<TClickEventArgs>(string commandName, EventCallback<TClickEventArgs> clickHandler) where TClickEventArgs : TableGridBaseCommandEventArgs, new()
Parameters:commandNamestringclickHandlerEventCallback<TClickEventArgs>Returns:

Task

C#
protected Task Update()
Returns:

Task

Properties

Controls the layout and alignment of form action buttons like Save and Cancel. Use Start to align buttons to the left, Center to center buttons horizontally, End to align buttons to the right, or Stretch to make buttons fill available width equally.

C#
[Parameter]
public FormButtonsLayout? ButtonsLayout { get; set; }
C#
public virtual RenderFragment<EditFormTemplateContextBase> ButtonsTemplate { get; set; }

Number of columns to arrange form fields into when using horizontal orientation. Creates a grid layout for better space utilization.

C#
[Parameter]
public int Columns { get; set; }

The collection of columns that define the structure and layout of the edit form fields.

C#
[Parameter]
public List<IColumn> ColumnsCollection { get; set; }

CSS spacing value between form field columns when multiple columns are used. Accepts CSS units like px, rem, or em.

C#
[Parameter]
public string ColumnSpacing { get; set; }

ExecuteCommand

Func<TableCommandEventArgs, Task>

Callback function to execute command operations like Save, Cancel, or Update when form actions are triggered.

C#
[Parameter]
public Func<TableCommandEventArgs, Task> ExecuteCommand { get; set; }
C#
protected TelerikForm FormRef { get; set; }
C#
public virtual RenderFragment<EditFormTemplateContextBase> FormTemplate { get; set; }

Indicates whether this is a new item being created or an existing item being edited. Used to determine form behavior and validation.

C#
[Parameter]
public bool IsNew { get; set; }

Item

TItem

The data item being edited in the form. Contains the current values for all editable properties.

C#
[Parameter]
public TItem Item { get; set; }

Sets the layout direction of form fields. Use Horizontal for side-by-side label and input placement to save vertical space, or Vertical for stacked labels above inputs for better readability on narrow screens.

C#
[Parameter]
public FormOrientation Orientation { get; set; }

Sets the overall size theme for form fields and controls. Use Small, Medium, or Large to adjust field dimensions and spacing.

C#
[Parameter]
public string Size { get; set; }
C#
public bool ValidationEnabled { get; }

ValidationSettings

IValidationSettings

Configuration settings for form validation behavior. Controls whether validation is enabled and how it behaves.

C#
[Parameter]
public IValidationSettings ValidationSettings { get; set; }