ClassTelerikForm
The class for the Telerik Form Component.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class TelerikForm : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IFormItemsContainer
Inheritance: objectComponentBaseBaseComponentTelerikForm
Implements:
Inherited Members
Constructors
TelerikForm()
Declaration
public TelerikForm()
Properties
AutoComplete
Defines the autocomplete attribute of the form.
Declaration
[Parameter]
public string AutoComplete { get; set; }
Property Value
ButtonsLayout
Defines the different buttons layout for horizontal alignment. Default value is End for horizontal, and Start for vertical.
Declaration
[Parameter]
public FormButtonsLayout? ButtonsLayout { get; set; }
Property Value
ColumnSpacing
Defines the spacing between columns in form grid layout.
Declaration
[Parameter]
public string ColumnSpacing { get; set; }
Property Value
Columns
Defines the count of columns in form grid layout.
EditContext
Defines the EditContext of the form. The user should specify either EditContext, or Model.
Declaration
[Parameter]
public EditContext EditContext { get; set; }
Property Value
FormButtons
Defines the template for the form buttons. By default, the form renders a Submit button.
Declaration
[Parameter]
public RenderFragment FormButtons { get; set; }
Property Value
FormItems
Defines the form items.
Declaration
[Parameter]
public RenderFragment FormItems { get; set; }
Property Value
FormItemsTemplate
Defines the form items template. In this tempalte you can use TelerikFormItemRenderer and TelerikFormGroupRenderer tags and customize the form layout. The context of the template is a FormItemsTemplateContext which contains a list of IFormItemBase items. The items can be of type IFormItem or IFormGroup and they persist the same structure and order as they are defined in FormItems RenderFragment parameter.
Declaration
[Parameter]
public RenderFragment<FormItemsTemplateContext> FormItemsTemplate { get; set; }
Property Value
FormValidation
Defines the form validation. Should be used for declaring validator, validation summary. Renders before the FormItems and FormButtons.
Declaration
[Parameter]
public RenderFragment FormValidation { get; set; }
Property Value
Id
Defines the id attribute of the form.
Model
Defines the model of the form. If no FormItems are added, it will automatically generate fields for the user. The user should specify either Model, or EditContext.
OnInvalidSubmit
Fires when the form is submitted with invalid EditContext.
Declaration
[Parameter]
public EventCallback<EditContext> OnInvalidSubmit { get; set; }
Property Value
OnSubmit
Fires when the form is submitted. Use this event for manually triggering validation. Cannot be used together with OnValidSubmit and OnInvalidSubmit.
Declaration
[Parameter]
public EventCallback<EditContext> OnSubmit { get; set; }
Property Value
OnUpdate
Event triggered upon editing a field in the Telerik Form. The changed field name and newly updated model are available through the FormUpdateEventArgs event context.
Declaration
[Parameter]
public EventCallback<FormUpdateEventArgs> OnUpdate { get; set; }
Property Value
OnValidSubmit
Fires when the form is submitted with valid EditContext.
Declaration
[Parameter]
public EventCallback<EditContext> OnValidSubmit { get; set; }
Property Value
Orientation
Defines the orientation of the form in terms of label and form editor position. Default value is Vertical
.
Declaration
[Parameter]
public FormOrientation Orientation { get; set; }
Property Value
ValidationMessageType
Defines the way the validation errors should be displayed. Default value is Inline
.
Declaration
[Parameter]
public FormValidationMessageType ValidationMessageType { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder builder)
Parameters
builder
Overrides
IsValid()
Validates the form and checks whether is valid or not.
OnParametersSet()
Declaration
protected override void OnParametersSet()
Overrides
SetParametersAsync(ParameterView)
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
parameters
Returns
Overrides