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 Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    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

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic FiddlerCap FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
  • Blazor Hybrid
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • Blazor Tutorials and Learning
    • First Stepswith Blazor Web Assembly
    • First Steps with Blazor Server
    • First Steps with Blazor Hybrid
    • Accessibility and Security
    • Submit a Ticket
    • FAQs

    Docs & Resources

    • Docs
    • Demos
    • Modernization and Migration
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs

    Productivity and Design Tools

    • REPL for Blazor
    • ThemeBuilder
    • Design System Documentation
    • Figma Kits
    • Visual Studio Extensions
    • Visual Studio Code Extensions
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • 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.InvokeComponentVoidMethodAsync(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

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.AddFormItem(IFormItemBase)

IFormItemsContainer.FormItemsCollection

Declaration
List<IFormItemBase> IFormItemsContainer.FormItemsCollection { get; }
Returns
System.Collections.Generic.List<IFormItemBase>

Implements
IFormItemsContainer.FormItemsCollection

IFormItemsContainer.RemoveFormItem(IFormItemBase, Boolean)

Declaration
void IFormItemsContainer.RemoveFormItem(IFormItemBase item, bool isAutoGenerated)
Parameters
IFormItemBase item

System.Boolean isAutoGenerated

Implements
IFormItemsContainer.RemoveFormItem(IFormItemBase, Boolean)
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.