Unplanned
Last Updated: 16 Apr 2025 09:36 by Stenly
Stenly
Created on: 16 Apr 2025 09:36
Category: GridView
Type: Bug Report
1
GridView: CellTemplate can sometimes not get applied when changing the columns display indexes and applying grouping

In the case where some of the columns are hidden and all of the columns' display indexes are changed, applying grouping could result in some of the cells from the columns that have custom CellTemplate to not receive it.

To work this around, you could manually change the widths of the columns by iterating the Columns collection as shown below:

foreach (var column in this.GridView.Columns)
{
    GridViewLength length = column.Width;

    if (length.IsAbsolute)
    {
        column.Width = new GridViewLength(length.Value + 0.00001);
    }
}

0 comments