Skip to main content
All docs
V24.2

DxTreeListColumn.VisibleChanged Event

Fires when column visibility changes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Parameters

Type Description
Boolean

A new Visible property value.

Remarks

The VisibleChanged event fires each time the Visible property value changes. The event is handled automatically when you use two-way data binding for the Visible property (@bind-Visible).

@inject EmployeeTaskService EmployeeTaskService
<style>
    .column-chooser-button{
        width: 200px;
    }
</style>
<DxButton Text="Column Chooser"
          RenderStyle="ButtonRenderStyle.Secondary"
          CssClass="column-chooser-button"
          Click="OnClick" />
<p />
<DxTreeList @ref="TreeList" Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId">
    <Columns>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" />
        <DxTreeListDataColumn FieldName="EmployeeName" />
        <DxTreeListDataColumn FieldName="StartDate" @bind-Visible="Visible" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
</DxTreeList>

<p>The TemperartureF column's <b>Visible</b> property value is <b>@Visible</b></p>

@code {
    DxTreeList TreeList { get; set; }
    bool Visible { get; set; } = false;
    List<EmployeeTask> TreeListData { get; set; }

    protected override void OnInitialized() {
        TreeListData = EmployeeTaskService.GenerateData();
    }
    void OnClick() {
        TreeList.ShowColumnChooser(".column-chooser-button");
    }
}

Visible Changed

See Also