Skip to main content

DxCheckBox<T>.CheckedChanged Event

Fires when the checkbox’s state changes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public EventCallback<T> CheckedChanged { get; set; }

Parameters

Type Description
T

The data type.

Remarks

The CheckedChanged event occurs each time the Checked property value changes.

The following example handles this event and use the current checkbox state to enable/disable other checkboxes (change the Enabled property value):

<DxCheckBox Checked="@Checked" CheckedChanged="@((bool value) => CheckedChanged(value))">Silent Mode</DxCheckBox>
<DxCheckBox @bind-Checked="@SubChecked1" Enabled="@Enabled">Enable sound</DxCheckBox>
<DxCheckBox @bind-Checked="@SubChecked2" Enabled="@Enabled">Enable vibration</DxCheckBox>

@code{
    bool Enabled { get; set; } = false;

    bool Checked { get; set; } = true;
    bool SubChecked1 { get; set; } = true;
    bool SubChecked2 { get; set; } = false;

    void CheckedChanged(bool value) {
        Checked = value;
        Enabled = !value;
    }
}

CheckBox CheckedChanged

See Also