We want to toggle the “AllowsCellsWrap” dynamically after the data is set.
We bind the layout property to the grid like that:
<Smart.Blazor.Grid @ref=”grid”
DataSource=”@ViewModel.DataViewModel.RowData”
DataSourceSettings=”@GridDataSourceSettings”
Columns=”@columns”
Layout = “@gridLayout”
….>
We set the new values when the toggle event is triggered:
gridLayout.AllowCellsWrap = toogleValue;
if (toogleValue == true)
{
gridLayout.RowHeight = “auto”;
}
else
{
gridLayout.RowHeight = “”;
}
The only effect we see is the that the row height is changing immediately, but it has no effect for the cells wrap. If we load the data again,
than the new cells wrap setting is working.
It is possible that the cells wrap is immediately triggered like the row height property?