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

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>Untitled Page</title>
  <telerik:RadCodeBlock ID="CodeBlock" runat="server">
    <style type="text/css">
            
                 #<%= PageComboID %>_DropDown .rcbScroll
                {
	                overflow:hidden !important;
                }
           </style>
  </telerik:RadCodeBlock>
</head>
<body>
  <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div>
      <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT * FROM [Orders]" DeleteCommand="DELETE FROM [Orders] WHERE [OrderID] = @OrderID" InsertCommand="INSERT INTO [Orders] ([CustomerID], [EmployeeID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry]) VALUES (@CustomerID, @EmployeeID, @OrderDate, @RequiredDate, @ShippedDate, @ShipVia, @Freight, @ShipName, @ShipAddress, @ShipCity, @ShipRegion, @ShipPostalCode, @ShipCountry)" UpdateCommand="UPDATE [Orders] SET [CustomerID] = @CustomerID, [EmployeeID] = @EmployeeID, [OrderDate] = @OrderDate, [RequiredDate] = @RequiredDate, [ShippedDate] = @ShippedDate, [ShipVia] = @ShipVia, [Freight] = @Freight, [ShipName] = @ShipName, [ShipAddress] = @ShipAddress, [ShipCity] = @ShipCity, [ShipRegion] = @ShipRegion, [ShipPostalCode] = @ShipPostalCode, [ShipCountry] = @ShipCountry WHERE [OrderID] = @OrderID">
        <DeleteParameters>
          <asp:Parameter Name="OrderID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
          <asp:Parameter Name="CustomerID" Type="String" />
          <asp:Parameter Name="EmployeeID" Type="Int32" />
          <asp:Parameter DbType="Date" Name="OrderDate" />
          <asp:Parameter DbType="Date" Name="RequiredDate" />
          <asp:Parameter DbType="Date" Name="ShippedDate" />
          <asp:Parameter Name="ShipVia" Type="Int32" />
          <asp:Parameter Name="Freight" Type="Decimal" />
          <asp:Parameter Name="ShipName" Type="String" />
          <asp:Parameter Name="ShipAddress" Type="String" />
          <asp:Parameter Name="ShipCity" Type="String" />
          <asp:Parameter Name="ShipRegion" Type="String" />
          <asp:Parameter Name="ShipPostalCode" Type="String" />
          <asp:Parameter Name="ShipCountry" Type="String" />
          <asp:Parameter Name="OrderID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
          <asp:Parameter Name="CustomerID" Type="String" />
          <asp:Parameter Name="EmployeeID" Type="Int32" />
          <asp:Parameter DbType="Date" Name="OrderDate" />
          <asp:Parameter DbType="Date" Name="RequiredDate" />
          <asp:Parameter DbType="Date" Name="ShippedDate" />
          <asp:Parameter Name="ShipVia" Type="Int32" />
          <asp:Parameter Name="Freight" Type="Decimal" />
          <asp:Parameter Name="ShipName" Type="String" />
          <asp:Parameter Name="ShipAddress" Type="String" />
          <asp:Parameter Name="ShipCity" Type="String" />
          <asp:Parameter Name="ShipRegion" Type="String" />
          <asp:Parameter Name="ShipPostalCode" Type="String" />
          <asp:Parameter Name="ShipCountry" Type="String" />
        </InsertParameters>
      </asp:SqlDataSource>
    </div>
    <telerik:RadAjaxPanel ID="ajaxPanel" runat="server">
      <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateEditColumn="true" AutoGenerateDeleteColumn="true" DataSourceID="SqlDataSource1" GridLines="None" Width="800px"
        OnItemCreated="RadGrid1_ItemCreated">
        <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="top" AllowAutomaticDeletes="true" AllowAutomaticUpdates="true" AllowPaging="True" DataKeyNames="OrderID"
          DataSourceID="SqlDataSource1">
          <Columns>
            <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" HeaderText="OrderID"
              ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" SortExpression="CustomerID"
              UniqueName="CustomerID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="EmployeeID" DataType="System.Int32" HeaderText="EmployeeID"
              SortExpression="EmployeeID" UniqueName="EmployeeID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" HeaderText="OrderDate"
              SortExpression="OrderDate" UniqueName="OrderDate">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="RequiredDate" DataType="System.DateTime" HeaderText="RequiredDate"
              SortExpression="RequiredDate" UniqueName="RequiredDate">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ShippedDate" DataType="System.DateTime" HeaderText="ShippedDate"
              SortExpression="ShippedDate" UniqueName="ShippedDate">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ShipVia" DataType="System.Int32" HeaderText="ShipVia"
              SortExpression="ShipVia" UniqueName="ShipVia">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Freight" DataType="System.Decimal" HeaderText="Freight"
              SortExpression="Freight" UniqueName="Freight">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ShipName" HeaderText="ShipName" SortExpression="ShipName"
              UniqueName="ShipName">
            </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="ShipRegion" HeaderText="ShipRegion" SortExpression="ShipRegion"
              UniqueName="ShipRegion">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ShipPostalCode" HeaderText="ShipPostalCode" SortExpression="ShipPostalCode"
              UniqueName="ShipPostalCode">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ShipCountry" HeaderText="ShipCountry" SortExpression="ShipCountry"
              UniqueName="ShipCountry">
            </telerik:GridBoundColumn>
          </Columns>
        </MasterTableView>

      </telerik:RadGrid>
    </telerik:RadAjaxPanel>
  </form>
</body>
</html>
