BlazorTable icon indicating copy to clipboard operation
BlazorTable copied to clipboard

Pre Setup Columns visibility..!!

Open irushabh opened this issue 4 years ago • 1 comments

Hello Ivan,

Really great Component for DataGrid in Blazor. I have some question regarding implementing GRID.

Question 1: Can you please guide me how to set grid columns visibility from oninitialized event?

image

irushabh avatar Jan 07 '21 18:01 irushabh

Should be possible this way (example):

<Table @ref="table" ...> 
...
</Table>
    private ITable<T> table;

    protected override async Task OnInitializedAsync()
    {
        foreach (IColumn<T> column in table.Columns)
        {
            if (column.Title == "xyz") // condition
            {
                column.Visible = false; // column visibility
            }
        }
    }

NilsPur avatar Jan 25 '21 17:01 NilsPur