alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class FormAutoGenerateItems

    Provides an infrastructure component for the automatic generation of form items within the context of FormItems.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    FormAutoGenerateItems
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.DataForm
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class FormAutoGenerateItems : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    This class is essential for the Syncfusion DataForm's auto-generation functionality. It simplifies the developer's workflow by automatically generating the necessary form items and facilitates the internal management of item lifecycles inside a FormItems container. It is not meant to be instantiated directly by users and primarily serves as a building block within the Syncfusion DataForm rendering architecture.

    Examples

    The following example demonstrates how to use FormAutoGenerateItems within a data form component to automatically generate form fields for an Employee model.

    <SfDataForm Model="Employee">
        <FormItems>
            <FormAutoGenerateItems />
        </FormItems>
    </SfDataForm>

    Constructors

    FormAutoGenerateItems()

    Declaration
    public FormAutoGenerateItems()

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Dispose(bool)

    Releases all resources used by the FormAutoGenerateItems component and removes references when the component is disposed.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Indicates whether this method was invoked by user code (true) or by the runtime (false).

    Overrides
    OwningComponentBase.Dispose(bool)
    Remarks

    This override ensures that references such as Syncfusion.Blazor.DataForm.FormAutoGenerateItems.Parent are set to null to avoid memory leaks and dangling references. It is a crucial part of proper resource management when the component is no longer in use and is being garbage collected or disposed from the component tree.

    OnInitialized()

    Performs component initialization and registers the FormAutoGenerateItems with its parent FormItems container for automatic form item generation.

    Declaration
    protected override void OnInitialized()
    Overrides
    ComponentBase.OnInitialized()
    Remarks

    This method is invoked during the component lifecycle initialization phase, ensuring that the FormAutoGenerateItems is recognized and integrated with its parent FormItems for proper item auto-generation support within the Syncfusion DataForm lifecycle. Calls Parent?.UpdateItem(null, this) internally as part of the registration mechanism for auto-generation.

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved