<%@ 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">
    
    .class1
    {
    display:none;
    }
    
    .class2
    {
    display:block;
    }
    
    </style>
    
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" ID="ScriptManager1">
        </asp:ScriptManager>
        

        <script type="text/javascript">
        
      
        
        </script>

        <telerik:RadAjaxManager runat="server" ID="AjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Panel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        &nbsp; &nbsp;<br />
        <br />
        <br />
        
        Please, hide the panel with display:none rather than visible false. 
        This will allow it to be ajaxified properly
        
        <asp:Panel ID="Panel1" runat="server" Height="230px" Width="415px" CssClass="class1"> 
            <h4>
                Do you wish to Continue?</h4>
            <asp:Label ID="Label1" runat="server">Some Text</asp:Label>
            <asp:Button runat="server" ID="btnContinue" Text="Continue" CssClass="button"/>
            <asp:Button runat="server" ID="btnCancel" Text="Cancel" CssClass="button"/>
        </asp:Panel>
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="AccessDataSource1" GridLines="None" OnItemCommand="RadGrid1_ItemCommand">
            <HeaderContextMenu EnableTheming="True">
                <CollapseAnimation Duration="200" Type="OutQuint" />
            </HeaderContextMenu>
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="CategoryID" DataSourceID="AccessDataSource1">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="CategoryID" DataType="System.Int32" HeaderText="CategoryID"
                        ReadOnly="True" SortExpression="CategoryID" UniqueName="CategoryID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName"
                        UniqueName="CategoryName">
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridTemplateColumn>
                    <ItemTemplate>
                    <asp:Button runat="server" ID="Button1" Text="Test" CommandName="test" />
                    </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    
                </Columns>
            </MasterTableView>
            <FilterMenu EnableTheming="True">
                <CollapseAnimation Duration="200" Type="OutQuint" />
            </FilterMenu>
        </telerik:RadGrid><asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb"
            SelectCommand="SELECT [CategoryID], [CategoryName] FROM [Categories]"></asp:AccessDataSource>
    </form>
</body>
</html>
