I receive a "Invalid group by expression: Group By clause missing" when grouping a GridTemplateColumn. However, if I set that same column as a GridBoundColumn, grouping works correctly. Also, if I set the GridTemplateColumn to be grouped by default the GroupByExpressions collection, it is grouped properly, but then if I remove the grouping and drag the column to be grouped again, it fails with the same error.
If I remove the GroupByExpression from the GridTemplateColumn definition and try to group by dragging, I get a "Telerik.Web.UI.GridGroupByException: Expression cannot be null or empty" error.
GridBoundColumn definition that works:
GridTemplateColumn defination that fails (with GroupByExpression="School" I get "Invalid group by expression: Group By clause missing" and without it I get "Telerik.Web.UI.GridGroupByException: Expression cannot be null or empty":
If I remove the GroupByExpression from the GridTemplateColumn definition and try to group by dragging, I get a "Telerik.Web.UI.GridGroupByException: Expression cannot be null or empty" error.
GridBoundColumn definition that works:
<
telerik:GridBoundColumn
UniqueName="School1"
SortExpression="School"
DataField="School"
HeaderText="School"
AllowFiltering="true"
Groupable="true"
HeaderStyle-Width="75"
ItemStyle-Width="75"
FooterStyle-Width="75"/>
GridTemplateColumn defination that fails (with GroupByExpression="School" I get "Invalid group by expression: Group By clause missing" and without it I get "Telerik.Web.UI.GridGroupByException: Expression cannot be null or empty":
<
telerik:GridTemplateColumn
UniqueName="School2"
SortExpression="School"
DataField="School"
HeaderText="School"
AllowFiltering="true"
Groupable="true"
HeaderStyle-Width="75"
ItemStyle-Width="75"
FooterStyle-Width="75">
<ItemTemplate>
<%
# Eval("School") %>
</ItemTemplate>
</telerik:GridTemplateColumn>