<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <telerik:RadScriptBlock runat="server">
        <script type="text/javascript">
            var gridID = null;
            function GetInstance()
            {
                debugger;
                if (gridID)
                {
                    var radgrid = $find(gridID);
                    alert(radgrid);
                }
                else
                {
                    alert("You need to click on Load grid button first");
                }
            }
        </script>
    </telerik:RadScriptBlock>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
        <asp:Button ID="Button1" Text="Load grid" runat="server" />
        <asp:Panel runat="server" ID="Panel1"></asp:Panel>
        <asp:Button Text="Get the RadGrid instance" OnClientClick="GetInstance();return false;" runat="server" />
    </telerik:RadAjaxPanel>
</asp:Content>
