skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class TelerikForm

The class for the Telerik Form Component.

Inheritance
System.Object
BaseComponent
TelerikForm
Inherited Members
BaseComponent.ShouldRender()
BaseComponent.OnInitializedAsync()
BaseComponent.OnAfterRenderAsync(Boolean)
BaseComponent.Dispose()
BaseComponent.InitLocalizer()
BaseComponent.ThrowIfParameterIsNull(Object, String)
BaseComponent.HaveOptionsChanged(IDictionary<String, Object>, IDictionary<String, Object>)
BaseComponent.GetClassString(String[])
BaseComponent.InvokeAsync<T>(String, Object[])
BaseComponent.InvokeAsync<T>(String, CancellationToken, Object[])
BaseComponent.InvokeVoidAsync(String, Object[])
BaseComponent.InvokeComponentMethodAsync<T>(String, Object[])
BaseComponent.InvokeComponentMethodAsync<T>(String, CancellationToken, Object[])
BaseComponent.InvokeVoidComponentMethodAsync(String, Object[])
BaseComponent.InvokeDisposeAsync()
BaseComponent.StateHasChanged()
BaseComponent.RootComponent
BaseComponent.Class
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

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

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Client-side Blazor
  • Server-side Blazor
  • Demos
Community
  • Forums
  • Blogs
  • Feedback Portal
Support Resources
  • Demos
  • Knowledge Base
  • Samples Repo
  • Localizations Repo
Sample Applications
  • Dashboard
  • PWA - Stocks
  • PWA - Blazing Coffee Roasters

Copyright © 2019 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.