New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Multi-Column Headers

Drag a column header and drop it here to group by that column
Supplier NameLocationProduct Details
AddressCityCategoryNameQuantityOrder DetailsPrice
IDNameFreightDateAddress
Mayumi's92 Setsuko Chuo-kuOsaka7ProduceTofu40 - 100 g pkgs.64.8610/9/1996 12:00:00 AMMaubelstr. 9023.25
Mayumi's92 Setsuko Chuo-kuOsaka7ProduceTofu40 - 100 g pkgs.0.5910/18/1996 12:00:00 AMTorikatu 3823.25
Mayumi's92 Setsuko Chuo-kuOsaka7ProduceTofu40 - 100 g pkgs.20.1212/6/1996 12:00:00 AMCity Center Plaza 516 Main St.23.25
Mayumi's92 Setsuko Chuo-kuOsaka2CondimentsGenen Shouyu24 - 250 ml bottles4.8810/7/1996 12:00:00 AMMaubelstr. 9015.50
Mayumi's92 Setsuko Chuo-kuOsaka2CondimentsGenen Shouyu24 - 250 ml bottles42.684/9/1997 12:00:00 AM1 rue Alsace-Lorraine15.50
Mayumi's92 Setsuko Chuo-kuOsaka2CondimentsGenen Shouyu24 - 250 ml bottles13.736/25/1997 12:00:00 AM87 Polk St. Suite 515.50
Pavlova, Ltd.74 Rose St. Moonie PondsMelbourne6Meat/PoultryAlice Mutton20 - 1 kg tins64.5010/2/1996 12:00:00 AMAvda. Azteca 12339.00
Pavlova, Ltd.74 Rose St. Moonie PondsMelbourne6Meat/PoultryAlice Mutton20 - 1 kg tins84.2110/25/1996 12:00:00 AM2743 Bering St.39.00
Pavlova, Ltd.74 Rose St. Moonie PondsMelbourne6Meat/PoultryAlice Mutton20 - 1 kg tins15.6610/28/1996 12:00:00 AM43 rue St. Laurent39.00
Pavlova, Ltd.74 Rose St. Moonie PondsMelbourne8SeafoodCarnarvon Tigers16 kg pkg.166.3110/29/1996 12:00:00 AM12, rue des Bouchers62.50
Pavlova, Ltd.74 Rose St. Moonie PondsMelbourne8SeafoodCarnarvon Tigers16 kg pkg.52.8410/17/1996 12:00:00 AM43 rue St. Laurent62.50
Pavlova, Ltd.74 Rose St. Moonie PondsMelbourne8SeafoodCarnarvon Tigers16 kg pkg.257.629/13/1996 12:00:00 AM2743 Bering St.62.50
Specialty Biscuits, Ltd.29 King's WayManchester3ConfectionsTeatime Chocolate Biscuits10 boxes x 12 pieces249.0611/4/1996 12:00:00 AMTaucherstraße 109.20
Specialty Biscuits, Ltd.29 King's WayManchester3ConfectionsTeatime Chocolate Biscuits10 boxes x 12 pieces21.481/14/1997 12:00:00 AMRua Orós, 929.20
Specialty Biscuits, Ltd.29 King's WayManchester3ConfectionsTeatime Chocolate Biscuits10 boxes x 12 pieces22.721/16/1997 12:00:00 AMTorikatu 389.20
Specialty Biscuits, Ltd.29 King's WayManchester3ConfectionsSir Rodney's Marmalade30 gift boxes789.954/22/1997 12:00:00 AMKirchgasse 681.00
Specialty Biscuits, Ltd.29 King's WayManchester3ConfectionsSir Rodney's Marmalade30 gift boxes890.7812/4/1996 12:00:00 AMAlameda dos Canàrios, 89181.00
Specialty Biscuits, Ltd.29 King's WayManchester3ConfectionsSir Rodney's Marmalade30 gift boxes168.6412/16/1996 12:00:00 AMBerguvsvägen 881.00
Specialty Biscuits, Ltd.29 King's WayManchester3ConfectionsSir Rodney's Scones24 pkgs. x 4 pieces101.9511/29/1996 12:00:00 AMKirchgasse 610.00
Specialty Biscuits, Ltd.29 King's WayManchester3ConfectionsSir Rodney's Scones24 pkgs. x 4 pieces0.5910/18/1996 12:00:00 AMTorikatu 3810.00
Specialty Biscuits, Ltd.29 King's WayManchester3ConfectionsSir Rodney's Scones24 pkgs. x 4 pieces60.2612/27/1996 12:00:00 AMEstrada da saúde n. 5810.00
PB Knäckebröd ABKaloadagatan 13Göteborg5Grains/CerealsGustaf's Knäckebröd24 - 500 g pkgs.9.212/4/1997 12:00:00 AMBerkeley Gardens 12 Brewery21.00
PB Knäckebröd ABKaloadagatan 13Göteborg5Grains/CerealsGustaf's Knäckebröd24 - 500 g pkgs.48.777/18/1997 12:00:00 AM187 Suffolk Ln.21.00
PB Knäckebröd ABKaloadagatan 13Göteborg5Grains/CerealsGustaf's Knäckebröd24 - 500 g pkgs.149.495/30/1997 12:00:00 AMTorikatu 3821.00
PB Knäckebröd ABKaloadagatan 13Göteborg5Grains/CerealsTunnbröd12 - 250 g pkgs.108.2610/24/1996 12:00:00 AMBerliner Platz 439.00
PB Knäckebröd ABKaloadagatan 13Göteborg5Grains/CerealsTunnbröd12 - 250 g pkgs.135.3512/27/1996 12:00:00 AMBerliner Platz 439.00
PB Knäckebröd ABKaloadagatan 13Göteborg5Grains/CerealsTunnbröd12 - 250 g pkgs.0.7811/7/1996 12:00:00 AMAdenauerallee 9009.00
Refrescos Americanas LTDAAv. das Americanas 12.890Sao Paulo1BeveragesGuaraná Fantástica12 - 355 ml cans1.3011/12/1996 12:00:00 AMJardim das rosas n. 324.50
Refrescos Americanas LTDAAv. das Americanas 12.890Sao Paulo1BeveragesGuaraná Fantástica12 - 355 ml cans41.9511/15/1996 12:00:00 AMBrook Farm Stratford St. Mary4.50
Refrescos Americanas LTDAAv. das Americanas 12.890Sao Paulo1BeveragesGuaraná Fantástica12 - 355 ml cans19.6411/20/1996 12:00:00 AM1 rue Alsace-Lorraine4.50
Page size:
 189 items in 7 pages
  • Sort Ascending
  • Sort Descending
  • Clear Sorting
  • Group By
  • Ungroup
  • Columns

This demo illustrates how the RadGrid can be configured to show MultiColumn headers.

  • Use ColumnGroups to define each level of multiheaders
  • Use ColumnGroupName property of GridColumn to assign a column to a specific multiheader.
  • Use HeaderContextMenu to show and hide columns and see how this works with the MultiColumn headers.
  • Column reordering and drag to group is supported only for headers representing actual grid columns. Column reordering is restricted to columns from the same group.
  • DefaultCS.aspx
<%@ Page Language="c#"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <div class="demo-container no-bg">
    <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" ShowGroupPanel="true" AllowSorting="true"
        DataSourceID="SqlDataSource1" AllowPaging="true" PageSize="30" AutoGenerateColumns="false" Width="100%">
        <ClientSettings AllowColumnsReorder="true" AllowDragToGroup="true" ReorderColumnsOnClient="true">
            <Scrolling AllowScroll="true" UseStaticHeaders="true"></Scrolling>
            <Resizing AllowColumnResize="true" EnableRealTimeResize="true" />
        </ClientSettings>
        <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
        <MasterTableView EnableHeaderContextMenu="true">
            <ColumnGroups>
                <telerik:GridColumnGroup HeaderText="Product Details" Name="ProductDetails" HeaderStyle-HorizontalAlign="Center">
                </telerik:GridColumnGroup>
                <telerik:GridColumnGroup HeaderText="Location" Name="Location">
                </telerik:GridColumnGroup>
                <telerik:GridColumnGroup HeaderText="Category" Name="Category" ParentGroupName="ProductDetails">
                </telerik:GridColumnGroup>
                <telerik:GridColumnGroup HeaderText="Order Details" Name="OrderDetails" ParentGroupName="ProductDetails"
                    HeaderStyle-HorizontalAlign="Center">
                </telerik:GridColumnGroup>
            </ColumnGroups>
            <Columns>
                <telerik:GridBoundColumn UniqueName="SupplierName" DataField="SupplierName" HeaderText="Supplier Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="Address" DataField="Address" ColumnGroupName="Location"
                    HeaderText="Address">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="City" DataField="City" ColumnGroupName="Location"
                    HeaderText="City">
                </telerik:GridBoundColumn>
                <telerik:GridNumericColumn UniqueName="ID" DataField="ID" ColumnGroupName="Category"
                    HeaderText="ID">
                </telerik:GridNumericColumn>
                <telerik:GridBoundColumn UniqueName="CategoryName" DataField="CategoryName" ColumnGroupName="Category"
                    HeaderText="Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="ProductName" DataField="ProductName" ColumnGroupName="ProductDetails"
                    HeaderText="Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn UniqueName="Quantity" DataField="Quantity" ColumnGroupName="ProductDetails"
                    HeaderText="Quantity">
                </telerik:GridBoundColumn>
                <telerik:GridNumericColumn UniqueName="Freight" DataField="Freight" ColumnGroupName="OrderDetails"
                    HeaderText="Freight">
                </telerik:GridNumericColumn>
                <telerik:GridDateTimeColumn UniqueName="OrderDate" DataField="OrderDate" ColumnGroupName="OrderDetails"
                    HeaderText="Date">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn UniqueName="OrderAddress" DataField="OrderAddress" ColumnGroupName="OrderDetails"
                    HeaderText="Address">
                </telerik:GridBoundColumn>
                <telerik:GridNumericColumn UniqueName="Price" DataField="Price" ColumnGroupName="ProductDetails"
                    HeaderText="Price">
                </telerik:GridNumericColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
   </div>
        <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT pdc.ProductID as ProductID, s.CompanyName as SupplierName, pdc.CategoryID as ID, pdc.CategoryName as CategoryName,
                pdc.ProductName as ProductName, pdc.QuantityPerUnit as Quantity, o.Freight as Freight, o.OrderDate as OrderDate,
                o.ShipAddress as OrderAddress, pdc.UnitPrice as Price, s.City as City, s.Address as Address 
        FROM Suppliers s 
        INNER JOIN (SELECT p.ProductID as ProductID, p.SupplierID as SupplierID, p.ProductName as ProductName,
                           p.QuantityPerUnit as QuantityPerUnit, p.UnitPrice  as UnitPrice, od.OrderID as OrderID, c.CategoryID as CategoryID, c.CategoryName as CategoryName
                    FROM Products p 
                    INNER JOIN [Order Details] od ON p.ProductID = od.ProductID INNER JOIN Categories c on c.CategoryID=p.CategoryID
                    WHERE od.OrderID in 
                        (SELECT TOP(3) od1.OrderID 
                         FROM [Order Details] od1 
                         WHERE od1.ProductID=od.ProductID)
                   ) pdc on pdc.SupplierID=s.SupplierID
        INNER JOIN Orders o on o.OrderID=pdc.OrderID 
        ORDER BY pdc.ProductID"
        runat="server"></asp:SqlDataSource>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance