<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<%@ Register Assembly="Telerik.Web.UI"  Namespace="Telerik.Web.UI" TagPrefix="telerik"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" ID="ScriptManager1"></asp:ScriptManager>
    <div>
        <telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="False" 
            AllowPaging="True" DataSourceID="LinqDataSource1" GridLines="None" 
            EnableLinqExpressions="true" >            
            <MasterTableView DataSourceID="LinqDataSource1" >
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldName="Customer.ContactName"
                                HeaderText="Customer" />
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="Customer.ContactName" />
                        </GroupByFields>
                    </telerik:GridGroupByExpression>                    
                </GroupByExpressions>
                <Columns>
                    <telerik:GridBoundColumn DataField="Customer.ContactName"  
                        UniqueName="CustomerH" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" 
                        HeaderText="OrderID" ReadOnly="True" SortExpression="OrderID" 
                        UniqueName="OrderID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" 
                        ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" 
                        HeaderText="OrderDate" ReadOnly="True" SortExpression="OrderDate" 
                        UniqueName="OrderDate">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShipCity" HeaderText="ShipCity" 
                        ReadOnly="True" SortExpression="ShipCity" UniqueName="ShipCity">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
            ContextTypeName="DataClassesDataContext"              
            TableName="Orders">
        </asp:LinqDataSource>
    </div>
    </form>
</body>
</html>
