Class TelerikForm
The class for the Telerik Form Component.
Inherited Members
Namespace: Telerik.Blazor.Components
Assembly: Telerik.Blazor.dll
Syntax
public class TelerikForm : BaseComponent, IDisposable, IFormContainer, IFormItemsContainer
Constructors
TelerikForm()
Declaration
public TelerikForm()
Properties
AutoComplete
Defines the autocomplete attribute of the form.
Declaration
public string AutoComplete { get; set; }
Property Value
System.String
|
ButtonsLayout
Defines the different buttons layout for horizontal alignment. Default value is End for horizontal, and Start for vertical.
Declaration
public Nullable<FormButtonsLayout> ButtonsLayout { get; set; }
Property Value
System.Nullable<FormButtonsLayout>
|
Columns
Defines the count of columns in form grid layout.
Declaration
public int Columns { get; set; }
Property Value
System.Int32
|
ColumnSpacing
Defines the spacing between columns in form grid layout.
Declaration
public string ColumnSpacing { get; set; }
Property Value
System.String
|
EditContext
Defines the EditContext of the form. The user should specify either EditContext, or Model.
Declaration
public EditContext EditContext { get; set; }
Property Value
Microsoft.AspNetCore.Components.Forms.EditContext
|
FormButtons
Defines the template for the form buttons. By default, the form renders a Submit button.
Declaration
public RenderFragment FormButtons { get; set; }
Property Value
Microsoft.AspNetCore.Components.RenderFragment
|
FormItems
Defines the form items.
Declaration
public RenderFragment FormItems { get; set; }
Property Value
Microsoft.AspNetCore.Components.RenderFragment
|
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
public RenderFragment<FormItemsTemplateContext> FormItemsTemplate { get; set; }
Property Value
Microsoft.AspNetCore.Components.RenderFragment<FormItemsTemplateContext>
|
FormValidation
Defines the form validation. Should be used for declaring validator, validation summary. Renders before the FormItems and FormButtons.
Declaration
public RenderFragment FormValidation { get; set; }
Property Value
Microsoft.AspNetCore.Components.RenderFragment
|
Id
Defines the id attribute of the form.
Declaration
public string Id { get; set; }
Property Value
System.String
|
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.
Declaration
public object Model { get; set; }
Property Value
System.Object
|
OnInvalidSubmit
Fires when the form is submitted with invalid EditContext.
Declaration
public EventCallback<EditContext> OnInvalidSubmit { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<Microsoft.AspNetCore.Components.Forms.EditContext>
|
OnSubmit
Fires when the form is submitted. Use this event for manually triggering validation. Cannot be used together with OnValidSubmit and OnInvalidSubmit.
Declaration
public EventCallback<EditContext> OnSubmit { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<Microsoft.AspNetCore.Components.Forms.EditContext>
|
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
public EventCallback<FormUpdateEventArgs> OnUpdate { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<FormUpdateEventArgs>
|
OnValidSubmit
Fires when the form is submitted with valid EditContext.
Declaration
public EventCallback<EditContext> OnValidSubmit { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback<Microsoft.AspNetCore.Components.Forms.EditContext>
|
Orientation
Defines the orientation of the form in terms of label and form editor position. Default value is Vertical
.
Declaration
public FormOrientation Orientation { get; set; }
Property Value
FormOrientation
|
Size
Specifies the Size of the form. Default value is Medium.
Declaration
public string Size { get; set; }
Property Value
System.String
|
ValidationMessageType
Defines the way the validation errors should be displayed. Default value is Inline
.
Declaration
public FormValidationMessageType ValidationMessageType { get; set; }
Property Value
FormValidationMessageType
|
Width
Defines the width of the form.
Declaration
public string Width { get; set; }
Property Value
System.String
|
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder builder)
Parameters
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder
builder
|
IsValid()
Validates the form and checks whether is valid or not.
Declaration
public bool IsValid()
Returns
System.Boolean
|
OnParametersSet()
Declaration
protected override void OnParametersSet()
Refresh()
Re-renders the component.
Declaration
public void Refresh()
SetParametersAsync(ParameterView)
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Microsoft.AspNetCore.Components.ParameterView
parameters
|
Returns
System.Threading.Tasks.Task
|
Explicit Interface Implementations
IFormItemsContainer.AddFormItem(IFormItemBase)
Declaration
void IFormItemsContainer.AddFormItem(IFormItemBase item)
Parameters
IFormItemBase
item
|
Implements
IFormItemsContainer.FormItemsCollection
Declaration
List<IFormItemBase> IFormItemsContainer.FormItemsCollection { get; }
Returns
System.Collections.Generic.List<IFormItemBase>
|
Implements
IFormItemsContainer.RemoveFormItem(IFormItemBase, Boolean)
Declaration
void IFormItemsContainer.RemoveFormItem(IFormItemBase item, bool fromAutogeneratedOnly)
Parameters
IFormItemBase
item
|
System.Boolean
fromAutogeneratedOnly
|