<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadGridEntityDS.aspx.cs"
    Inherits="RadGridEntityDS" %>

<%@ 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" />
    <div>
        <telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="EntityDataSource1" AllowSorting="true"
            AllowPaging="true" PageSize="6" AllowFilteringByColumn="true" ShowStatusBar="true" 
            AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" AllowAutomaticInserts="true">
            <MasterTableView DataKeyNames="ProductID" AutoGenerateColumns="false" >
                <Columns>
                    <telerik:GridBoundColumn DataField="ProductID" HeaderText="ProductID" UniqueName="ProductID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" UniqueName="ProductName">
                    </telerik:GridBoundColumn>                  

                    <telerik:GridDropDownColumn DataField="CategoryID" HeaderText="Category"
                        DataSourceID="EntityDataSource2" 
                        ListValueField="CategoryID" ListTextField="CategoryName">
                    </telerik:GridDropDownColumn>

                    <telerik:GridBoundColumn DataField="QuantityPerUnit" HeaderText="Quantity per Unit"
                        UniqueName="QuantityPerUnit">
                    </telerik:GridBoundColumn>
                    <telerik:GridNumericColumn DataField="UnitPrice" HeaderText="Unit Price" UniqueName="UnitPrice">
                    </telerik:GridNumericColumn>
                    <telerik:GridCheckBoxColumn DataField="Discontinued" HeaderText="Discontinued" UniqueName="Discontinued">
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=NorthwindEntities"
            DefaultContainerName="NorthwindEntities" EntitySetName="Products" 
            EnableDelete="True" EnableFlattening="False" EnableInsert="True" 
            EnableUpdate="True" />

            <asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=NorthwindEntities"
            DefaultContainerName="NorthwindEntities" EntitySetName="Categories" 
            EnableFlattening="False" />
    </div>
    </form>
</body>
</html>
