All Controls


Rate this demo

Thank you for your post!
Submit a support ticket
If you have an active license or trial, you have access to dedicated support from Telerik’s developers. Response time is 24h for active licenses and 72h for trials, Mon-Fri.
Post in the forums
If you don’t have access to support or would like to help other people by sharing your problem, reach out to our active community in the forums.

Grid - Grouping

Received  -FolderName  
   ReceivedFromFolder nameSize
Data pager
Data pager
 Item 1 to 20 of 52
Page:of 3 Page size:

Received from date: Sunday, March 28, 2010


FolderName: Deleted Items

   3/28/2010NBullard@web.comDeleted Items8
   3/28/2010TSholl@web.comDeleted Items9
   3/28/2010SWard@web.comDeleted Items65

FolderName: Drafts


Received from date: Saturday, March 27, 2010


FolderName: Deleted Items

   3/27/2010FDuncan@web.comDeleted Items54
   3/27/2010SBonner@web.comDeleted Items4378

FolderName: Drafts


FolderName: Junk E-mail

   3/27/2010JGreenawalt@web.comJunk E-mail5678
   3/27/2010CCox@web.comJunk E-mail234
   3/27/2010EOmara@web.comJunk E-mail5

Received from date: Friday, March 26, 2010


FolderName: Inbox


FolderName: Junk E-mail

   3/26/2010FHeckendora@web.comJunk E-mail3

FolderName: Outbox


FolderName: Sent Items

   3/26/2010JQueer@web.comSent Items89

This example demonstrates how GroupByExpressions can be used in Telerik RadGrid:
Creating group-by expressions - GridGroupByField Properties:
  • FieldName: name of any field from the DataSource
  • FieldAlias: alias string. This cannot contain blanks or other reserved symbols like ',', '.' etc.
  • Aggregate: any of - min, max, sum, count, last, first etc (the same as in GridAggregateFunction enumeration)
  • SortOrder: acs or desc - the sort order of the grouped items
  • HeaderText: specifies the name to use for the field when it appears in the group header and in the group panel. This property lets you specify a field name that includes blanks or reserved characters. This property is only used for fields in the SelectFields collection. Meaningful for items from the SelectFields collection only.
  • FormatString: specifies a format string for formatting field values when they appear in the group header. This property is only used for fields in the SelectFields collection. Meaningful for items from the SelectFields collection only.
  • HeaderValueSeparator: specifies a string that appears in the group header between the header text and the value (or aggregated value). This property is only used for fields in the SelectFields collection. Meaningful for items from the SelectFields collection only.
Note that grouping is not supported with simple data-binding (calling DataBind()). See the Simple data binding demo from the Populating with data section for more info about the limitations of this binding mode.
Show code in new window Demo isolation steps
<%@ Page Language="c#"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns=''>
<head runat="server">
    <title>Grouping in Telerik ASP.NET AJAX Grid | ASP.NET AJAX Grid demos</title>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdateInitiatorPanelsOnly="true">
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" PageSize="20"
        AllowSorting="True" AllowMultiRowSelection="True" AllowPaging="True" ShowGroupPanel="True"
        AutoGenerateColumns="False" GridLines="none">
        <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
        <MasterTableView Width="100%">
                        <telerik:GridGroupByField FieldAlias="Received" FieldName="Received" FormatString="{0:D}"
                            HeaderValueSeparator=" from date: "></telerik:GridGroupByField>
                        <telerik:GridGroupByField FieldName="Received" SortOrder="Descending" ></telerik:GridGroupByField>
                        <telerik:GridGroupByField FieldAlias="FolderName" FieldName="FolderName"></telerik:GridGroupByField>
                        <telerik:GridGroupByField FieldName="FolderName"></telerik:GridGroupByField>
                <telerik:GridBoundColumn SortExpression="Received" HeaderText="Received" HeaderButtonType="TextButton"
                    DataField="Received" DataFormatString="{0:d}">
                <telerik:GridBoundColumn SortExpression="From" HeaderText="From" HeaderButtonType="TextButton"
                <telerik:GridBoundColumn SortExpression="FolderName" HeaderText="Folder name" HeaderButtonType="TextButton"
                <telerik:GridBoundColumn SortExpression="Size" HeaderText="Size" HeaderButtonType="TextButton"
        <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
            <Selecting AllowRowSelect="True"></Selecting>
            <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True"
        <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
    <br />
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Mails" runat="server"></asp:SqlDataSource>
Telerik UI for ASP.NET AJAX Q3'14 Release is here