RadzenFieldset Class

A fieldset container component that groups related form fields with a legend/header and optional collapse functionality. RadzenFieldset provides semantic form grouping with visual borders, useful for organizing complex forms into logical sections. Fieldsets are HTML form elements that semantically group related inputs, improving form structure and accessibility. Features visual and semantic grouping of related form fields, customizable header via Text or HeaderTemplate, optional expand/collapse to hide/show grouped fields, optional icon in the legend, optional summary content shown when collapsed, and screen reader announcement of fieldset legends for grouped fields. Use to organize forms into sections like "Personal Information", "Address", "Payment Details". When AllowCollapse is enabled, users can collapse sections they don't need to see.

Inheritance

Object

ComponentBase

RadzenComponent

RadzenFieldset

Implements

IComponent

IHandleEvent

IHandleAfterRender

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenFieldset : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender

Examples

Basic fieldset grouping form fields:

<RadzenFieldset Text="Personal Information">
    <RadzenStack Gap="1rem">
        <RadzenFormField Text="First Name">
            <RadzenTextBox @bind-Value=@model.FirstName />
        </RadzenFormField>
        <RadzenFormField Text="Last Name">
            <RadzenTextBox @bind-Value=@model.LastName />
        </RadzenFormField>
    </RadzenStack>
</RadzenFieldset>

Collapsible fieldset:

<RadzenFieldset Text="Advanced Options" Icon="settings" AllowCollapse="true">
    Advanced configuration fields...
</RadzenFieldset>

Constructors

RadzenFieldsetlink

A fieldset container component that groups related form fields with a legend/header and optional collapse functionality. RadzenFieldset provides semantic form grouping with visual borders, useful for organizing complex forms into logical sections. Fieldsets are HTML form elements that semantically group related inputs, improving form structure and accessibility. Features visual and semantic grouping of related form fields, customizable header via Text or HeaderTemplate, optional expand/collapse to hide/show grouped fields, optional icon in the legend, optional summary content shown when collapsed, and screen reader announcement of fieldset legends for grouped fields. Use to organize forms into sections like "Personal Information", "Address", "Payment Details". When AllowCollapse is enabled, users can collapse sections they don't need to see.

Declaration
public RadzenFieldset()

Properties

AllowCollapselink

Gets or sets a value indicating whether collapsing is allowed. Set to false by default.

Declaration
public bool AllowCollapse { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether collapsing is allowed. Set to false by default.

ChildContentlink

Gets or sets the child content.

Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the child content.

Collapselink

Gets or sets the collapse callback.

Declaration
public EventCallback Collapse { get; set; }
Property Value
Type Description
EventCallbackGets or sets the collapse callback.

CollapseAriaLabellink

Gets or sets the aria-label attribute of the collapse button.

Declaration
public string CollapseAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the aria-label attribute of the collapse button.

CollapseTitlelink

Gets or sets the title attribute of the collapse button.

Declaration
public string CollapseTitle { get; set; }
Property Value
Type Description
stringGets or sets the title attribute of the collapse button.

Collapsedlink

Gets or sets a value indicating whether this RadzenFieldset is collapsed.

Declaration
public bool Collapsed { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether this RadzenFieldset is collapsed.

Expandlink

Gets or sets the expand callback.

Declaration
public EventCallback Expand { get; set; }
Property Value
Type Description
EventCallbackGets or sets the expand callback.

ExpandAriaLabellink

Gets or sets the aria-label attribute of the expand button.

Declaration
public string ExpandAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the aria-label attribute of the expand button.

ExpandTitlelink

Gets or sets the title attribute of the expand button.

Declaration
public string ExpandTitle { get; set; }
Property Value
Type Description
stringGets or sets the title attribute of the expand button.

HeaderTemplatelink

Gets or sets the header template.

Declaration
public RenderFragment HeaderTemplate { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the header template.

Iconlink

Gets or sets the icon.

Declaration
public string Icon { get; set; }
Property Value
Type Description
stringGets or sets the icon.

IconColorlink

Gets or sets the icon color.

Declaration
public string IconColor { get; set; }
Property Value
Type Description
stringGets or sets the icon color.

SummaryTemplatelink

Gets or sets the summary template.

Declaration
public RenderFragment SummaryTemplate { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the summary template.

Textlink

Gets or sets the text.

Declaration
public string Text { get; set; }
Property Value
Type Description
stringGets or sets the text.

Methods

BuildRenderTreelink

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

GetComponentCssClasslink

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

OnInitializedlink

Declaration
protected override void OnInitialized()

SetParametersAsynclink

Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters
Returns
Type Description
Task
An error has occurred. This app may no longer respond until reloaded. Reload 🗙