<%@ 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">
    <div>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

            <script type="text/javascript">
                function Insert() {
                    window.radopen("Form.aspx", null);
                    return false;
                }
                function Update() {
                    window.radopen("Form.aspx", null);
                }
                function RefreshGrid(arg) {
                    $find("<%= RadAjaxPanel1.ClientID %>").ajaxRequest(arg);
                }  
            </script>

        </telerik:RadCodeBlock>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        </telerik:RadWindowManager>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" EnableAJAX="false" runat="server">
            <telerik:RadGrid ID="RadGrid1" runat="server" OnItemCommand="RadGrid1_ItemCommand"
                AllowPaging="True" DataSourceID="AccessDataSource1" GridLines="None">
                <MasterTableView AutoGenerateColumns="False" DataKeyNames="CustomerID" CommandItemDisplay="Top"
                    DataSourceID="AccessDataSource1">
                    <Columns>
                        <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True"
                            SortExpression="CustomerID" UniqueName="CustomerID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName"
                            UniqueName="CompanyName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Country" HeaderText="Country" SortExpression="Country"
                            UniqueName="Country">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City"
                            UniqueName="City">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <CommandItemTemplate>
                        <asp:LinkButton ID="insertButton" OnClientClick="return Insert();" runat="server">Insert</asp:LinkButton>
                    </CommandItemTemplate>
                </MasterTableView>
            </telerik:RadGrid>
            <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb"
                SelectCommand="SELECT [CustomerID], [CompanyName], [Country], [City] FROM [Customers]">
            </asp:AccessDataSource>
        </telerik:RadAjaxPanel>
    </div>
    </form>
</body>
</html>
