<%@ 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.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>Untitled Page</title>
    <style type="text/css"> 
 
 


</style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" ID="Manager1">
        </asp:ScriptManager>
        
        <script type="text/javascript">
        
        function OnRowDblClick()
        {
        var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
        masterTable.fireCommand("InitInsert","");
        }
        
        </script>
            
        <telerik:RadGrid runat="server" ID="RadGrid1" AllowPaging="True" DataSourceID="AccessDataSource1"
            GridLines="None" PageSize="7" OnPreRender="RadGrid1_PreRender">
            <MasterTableView CommandItemDisplay="Top" AutoGenerateColumns="False" DataKeyNames="OrderID"
                DataSourceID="AccessDataSource1">
                <Columns>
                    <telerik:GridButtonColumn CommandName="Delete" ButtonType="LinkButton" Text="CustomText">
                    </telerik:GridButtonColumn>
                    <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:GridDateTimeColumn DataField="RequiredDate" DataType="System.DateTime" HeaderText="RequiredDate2">
                    </telerik:GridDateTimeColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
            <ClientEvents OnRowDblClick="OnRowDblClick" />            
            </ClientSettings>
            <ClientSettings EnablePostBackOnRowClick="true">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
        </telerik:RadGrid><asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb"
            SelectCommand="SELECT [OrderID], [CustomerID], [EmployeeID], [OrderDate], [RequiredDate] FROM [Orders] Where 1=0">
        </asp:AccessDataSource>
    </form>
</body>
</html>
