#108706
FerrisChamp
Participant

Hi,

I am trying to freeze/unfreeze columns dynamically. My issue is that all my columns are in groups from what I test you can’t seem to freeze a column in a group unless you freeze the entire group.  My idea was to temporary create a “Frozen” group for all the items need to be frozen. However, the html doesn’t seem to be running again when I call grid.Render() thus I can’t refresh the grid to show the updated frozen columns. I put a break point in the html but it doesn’t hit it even when grid.Render() or grid.Refresh() is called.

<Columns>

@foreach (var column in Document.DocumentFields)
{
if(frozenColumns.Contains(column.FieldName))
{
<Column DataField=”@column.FieldName” Label=”@column.AliasName” ColumnGroup=”Frozen” Freeze=”near”
ValidationRules=”@column.DataType.ValidationRules” DataType=”@column.DataType.GetSmartType()” Width=”100″>
</Column>
}
else
{
<Column DataField=”@column.FieldName” Label=”@column.AliasName” ColumnGroup=”@column.GroupName”
ValidationRules=”@column.DataType.ValidationRules” DataType=”@column.DataType.GetSmartType()” Width=”100″>
</Column>
}
}
</Columns>

  • This reply was modified 1 year, 1 month ago by FerrisChamp.