<%@ 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></title>

    <script type="text/javascript">
        function Grid_OnCommandHandler(sender, e) {
            alert('1');
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadGrid ID="PhoneGrid" runat="server" Skin="Office2007" Width="400px" DataSourceID="SqlDataSource1"
            GridLines="None">
            <MasterTableView AllowAutomaticDeletes="true" TableLayout="Auto" DataKeyNames="TerritoryID"
                AutoGenerateColumns="False" DataSourceID="SqlDataSource1" EditMode="PopUp" CommandItemDisplay="Top">
                <Columns>
                    <telerik:GridBoundColumn HeaderStyle-Width="100" ItemStyle-Width="100" DataField="TerritoryID"
                        HeaderText="TerritoryID" UniqueName="TerritoryID" ReadOnly="True" SortExpression="TerritoryID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="TerritoryDescription" HeaderText="TerritoryDescription"
                        SortExpression="TerritoryDescription" UniqueName="TerritoryDescription">
                    </telerik:GridBoundColumn>
                </Columns>
                <NoRecordsTemplate>
                    <div style="height: 30px; cursor: pointer;">
                        No items to view</div>
                </NoRecordsTemplate>
                <EditFormSettings>
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnCommand="Grid_OnCommandHandler" />
            </ClientSettings>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
            SelectCommand="SELECT * FROM [Territories] WHERE TerritoryID = 'null'"></asp:SqlDataSource>
    </div>
    </form>
</body>
</html>
