Set DataGrid column width programmatically

Hello,
Iā€™m trying to restore the grid state once user revisit to the grid page. As a part of that I need to set column width programmatically. I did something like below. But it not working. Is it possible to change column width programmatically?

foreach (var column in Grid.ColumnsCollection)
            {
                column.Width = columnState.Width;  //"100px";
            }

Grid.Reload();
1 Like

Setting component properties like this isn't supported in general for Blazor components. You must data-bind the property:

<RadzenGridColumn Width=@columnstatet.Width />