11 Answers, 1 is accepted
In order to display the grid grouped by the template column, you will need to add a group by expression for it too.Expressions can be defined by assigning Expression property and/or managing the items in SelectFields or GroupByFields collections. It is not required to use both of them.
Find more information about group by expression in the following articles:
GridGroupByExpression Class
Declarative definition
Programmatic definition
Regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.

From the provided information I am not able to determine what have caused the unexpected behavior. At this point in order to progress in the resolution of this problem, it will be best if you open a formal support ticket and send me a small runnable application which would allow me to track the issue locally.
As soon as I do, I will get back to you with additional information/suggestions.
Sincerely yours,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.

I also have the showexport buttons turned on.
If you drag the template column into the group panel it groups just fine. However, when you try to export to word or excel it'll throw the relation to DataRelationCollection error.
However, if you first drag a bound column then export; no problems, meaning it exports correctly without any errors.
Definitely something funky when first use the template column.
If the issue persists, please send us the problematic code for further investigation. Thus I could be able to find a quick resolution of this issue.
Greetings,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

<script type="text/javascript"> | ||
function onRequestStart(sender, args) | ||
{ | ||
if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 || | ||
args.get_eventTarget().indexOf("ExportToWordButton") >= 0 || | ||
args.get_eventTarget().indexOf("ExportToPdfButton") >= 0 || | ||
args.get_eventTarget().indexOf("ExportToCsvButton") >= 0) | ||
{ | ||
args.set_enableAjax(false); | ||
} | ||
} | ||
</script> | ||
<telerik:RadGrid ID="gridMissingProductData" | ||
runat="server" | ||
AutoGenerateColumns="false" | ||
PageSize="20" | ||
PagerStyle-AlwaysVisible="true" | ||
PagerStyle-Mode="NextPrevNumericAndAdvanced" | ||
AllowPaging="true" | ||
AllowMultiRowSelection="true" | ||
AllowSorting="true" | ||
ShowGroupPanel="true" | ||
OnItemCommand="gridMissingProductData_ItemCommand" | ||
OnItemDataBound="gridMissingProductData_ItemDataBound" | ||
ShowFooter="true"> | ||
<ExportSettings></ExportSettings> | ||
<MasterTableView DataKeyNames="ProductID" | ||
GroupLoadMode="Client" | ||
TableLayout="Fixed" | ||
CommandItemDisplay="top"> | ||
<CommandItemSettings | ||
ShowExportToCsvButton="true" | ||
ShowExportToExcelButton="true" | ||
ShowExportToWordButton="true" /> | ||
<Columns> | ||
<telerik:GridBoundColumn HeaderText="ProductID" DataField="ProductID" Visible="false"></telerik:GridBoundColumn> | ||
<telerik:GridTemplateColumn HeaderText="SKU" DataField="ShortSKU" Groupable="true" GroupByExpression="Group By ShortSKU" SortExpression="ShortSKU" ItemStyle-Width="80px" HeaderStyle-Width="80px" UniqueName="ShortSKUTemplate"> | ||
<ItemTemplate> | ||
<asp:Label runat="server" ID="lblShortSKU" Text='<%# Bind("ShortSKU") %>'></asp:Label> | ||
</ItemTemplate> | ||
<FooterTemplate> | ||
<asp:Label runat="server" ID="lblShortSKUCount"></asp:Label> | ||
</FooterTemplate> | ||
</telerik:GridTemplateColumn> | ||
<telerik:GridBoundColumn HeaderText="Product" DataField="ProductDescription"></telerik:GridBoundColumn> | ||
<telerik:GridBoundColumn HeaderText="Category" DataField="WebCatName" ItemStyle-Width="150px" HeaderStyle-Width="150px"></telerik:GridBoundColumn> | ||
<telerik:GridBoundColumn HeaderText="Property" DataField="FeaturePropertyName" ItemStyle-Width="150px" HeaderStyle-Width="150px"></telerik:GridBoundColumn> | ||
<telerik:GridBoundColumn HeaderText="Group" DataField="PropertyGroupName" ItemStyle-Width="200px" HeaderStyle-Width="200px"></telerik:GridBoundColumn> | ||
<telerik:GridBoundColumn HeaderText="CG" DataField="CoordinateGroup" ItemStyle-Width="50px" HeaderStyle-Width="50px"></telerik:GridBoundColumn> | ||
<telerik:GridBoundColumn HeaderText="DK" DataField="Deck" ItemStyle-Width="25px" HeaderStyle-Width="25px"></telerik:GridBoundColumn> | ||
<telerik:GridBoundColumn HeaderText="OH" DataField="RetailChainOnHand" ItemStyle-Width="30px" HeaderStyle-Width="30px"></telerik:GridBoundColumn> | ||
<telerik:GridBoundColumn HeaderText="Type" DataField="EndecaType" ItemStyle-Width="50px" HeaderStyle-Width="50px"></telerik:GridBoundColumn> | ||
<telerik:GridBoundColumn HeaderText="Status" DataField="ProductStatus" ItemStyle-Width="60px" HeaderStyle-Width="60px"></telerik:GridBoundColumn> | ||
</Columns> | ||
</MasterTableView> | ||
<ClientSettings AllowGroupExpandCollapse="True" | ||
ReorderColumnsOnClient="True" | ||
AllowDragToGroup="True" | ||
AllowColumnsReorder="True"> | ||
<Selecting AllowRowSelect="True" /> | ||
</ClientSettings> | ||
<GroupingSettings ShowUnGroupButton="true" /> | ||
</telerik:RadGrid> |
I followed your scenario in order to replicate the issue but to no avail. Please find attached a simple working project which is working as expected. Give it a try and let me know if you need further assistance.
Additionally, please review the following help article for more information about GroupByExpression property for a GridTemplateColumn.
http://www.telerik.com/help/aspnet-ajax/grdgroupbydeclarativedefinition.html (Template column section)
I hope this helps.
Regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

You can find the correct link here:
http://www.telerik.com/help/aspnet-ajax/grid-group-by-declarative-definition.html
All the best,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Dim DA As Data.SqlClient.SqlDataAdapter
Dim DS As New Data.DataSet
Dim SQL As String
myConnection.ConnectionString = strCon
myConnection.Open()
SQL =
"SELECT a.JOURNAL_ID,D.PROJECT_ID,D.PROJECT_NAME, b.COMPONENT, c.TASK_TYPE, a.JOURNAL, a.ENTRY_BY, convert(varchar(10),a.JOURNAL_DATE,101) AS DATE, a.HOUR FROM JOURNAL_TBL AS a LEFT OUTER JOIN COMPONENTS_TBL AS b ON a.COMP_ID = b.COMP_ID LEFT OUTER JOIN TASK_TYPE_TBL AS c ON a.TASK_ID = c.TASK_ID LEFT OUTER JOIN PROJECT_TBL AS D ON D.PROJECT_ID = A.PROJECT_ID WHERE a.ENTRY_BY = '" & Session("IntraID") & "' and a.JOURNAL_DATE BETWEEN '" & Session("BeginDate") & "' AND '" & Session("EndDates") & "'"
DA =
New Data.SqlClient.SqlDataAdapter(SQL, myConnection)
DA.Fill(DS,
"Recordset")
myConnection.Close()
RadGrid1.DataSource = DS
RadGrid1.DataBind()
RadGrid1.MasterTableView.GroupByExpressions.Add(
"Group by DATE")
RadGrid1.Rebind()
ERROR WITH POSTBACK.
An error occured adding a relation to DataRelationCollection. Please, make sure you have configured the expressions properly - both GroupByFields and SelectFields are required!
PLEASE HELP. Thanks
The steps to build GroupByExpressions programmatically for the RadGrid is demonstrated in this online example:
http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/expressions/defaultcs.aspx
Make sure that you specify at least one selectfield and one groupbyfield for the dynamically created expression so that grouping functions properly.
Kind regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.