Skip to main content
All docs
V25.1
  • DxFormLayoutGroup.ExpandedChanged Event

    Fires when a Form Layout group expands or collapses.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [Parameter]
    public EventCallback<bool> ExpandedChanged { get; set; }

    Parameters

    Type Description
    Boolean

    The new Expanded property value.

    Remarks

    The ExpandedChanged event allows you to handle the group’s Expanded property value changes.

    The following code snippet handles the ExpandedChanged event:

    <DxFormLayout>
        <DxFormLayoutGroup Caption="Personal Information" 
                           ExpandedChanged="@ExpandedChanged"
                           ExpandButtonDisplayMode="GroupExpandButtonDisplayMode.Start">
            <DxFormLayoutItem Caption="First Name:">
                <DxTextBox />
            </DxFormLayoutItem>
            <DxFormLayoutItem Caption="Last Name:">
                <DxTextBox />
            </DxFormLayoutItem>
    
        </DxFormLayoutGroup>
    </DxFormLayout>
    
    The group is @GroupState
    
    @code {
        string GroupState { get; set; } = "open";
        void ExpandedChanged(bool NewExpanded) {
            if (NewExpanded)
                GroupState = "open";
            else
                GroupState = "closed";
        }
    }
    

    Collapsible group: state change

    Set the ExpandButtonDisplayMode property to Start or End to allow users to expand or collapse the group.

    See Also