<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" namespace="System.Web.UI.WebControls" tagprefix="asp" %>
<!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" AllowPaging="True" 
            AllowSorting="True" AutoGenerateDeleteColumn="True" 
            AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
            AutoGenerateEditColumn="True" DataSourceID="EntityDataSource1" GridLines="None">
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="OrderID" 
                            DataSourceID="EntityDataSource1" CommandItemDisplay="Top">
                <Columns>
                    <telerik:GridBoundColumn DataField="Freight" DataType="System.Decimal" 
                        HeaderText="Freight" SortExpression="Freight" UniqueName="Freight">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" 
                        HeaderText="OrderDate" SortExpression="OrderDate" UniqueName="OrderDate">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" 
                        HeaderText="OrderID" ReadOnly="True" SortExpression="OrderID" 
                        UniqueName="OrderID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="RequiredDate" DataType="System.DateTime" 
                        HeaderText="RequiredDate" SortExpression="RequiredDate" 
                        UniqueName="RequiredDate">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShipAddress" HeaderText="ShipAddress" 
                        SortExpression="ShipAddress" UniqueName="ShipAddress">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShipCity" HeaderText="ShipCity" 
                        SortExpression="ShipCity" UniqueName="ShipCity">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShipCountry" HeaderText="ShipCountry" 
                        SortExpression="ShipCountry" UniqueName="ShipCountry">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShipName" HeaderText="ShipName" 
                        SortExpression="ShipName" UniqueName="ShipName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShippedDate" DataType="System.DateTime" 
                        HeaderText="ShippedDate" SortExpression="ShippedDate" UniqueName="ShippedDate">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShipPostalCode" HeaderText="ShipPostalCode" 
                        SortExpression="ShipPostalCode" UniqueName="ShipPostalCode">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShipRegion" HeaderText="ShipRegion" 
                        SortExpression="ShipRegion" UniqueName="ShipRegion">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShipVia" DataType="System.Int32" 
                        HeaderText="ShipVia" SortExpression="ShipVia" UniqueName="ShipVia">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Customers.CustomerID" 
                        HeaderText="Customers.CustomerID" SortExpression="Customers.CustomerID" 
                        UniqueName="Customers.CustomerID">
                    </telerik:GridBoundColumn>                    
                    <telerik:GridBoundColumn DataField="Employees.EmployeeID" 
                        DataType="System.Int32" HeaderText="Employees.EmployeeID" 
                        SortExpression="Employees.EmployeeID" UniqueName="Employees.EmployeeID">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        
        <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
            ConnectionString="name=NorthwindEntities" 
            DefaultContainerName="NorthwindEntities" EnableDelete="True" 
            EnableInsert="True" EnableUpdate="True" EntitySetName="Orders">
        </asp:EntityDataSource>
        
    </div>
    </form>
</body>
</html>
