<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GridPersister.aspx.cs" Inherits="GridPersister" %>

<%@ 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">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
            </asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
    <div>
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel" LoadingPanelID="LoadingPanel1">
            <fieldset>
                <div style="width: 860px; height: 30px; padding: 10px 0;">
                    <div style="float: left;">
                        <telerik:RadComboBox runat="server" ID="UserSelection" AutoPostBack="true" Width="200px">
                            <Items>
                                <telerik:RadComboBoxItem Text="User1" Value="User1" Selected="true" />
                                <telerik:RadComboBoxItem Text="User2" Value="User2" />
                                <telerik:RadComboBoxItem Text="User3" Value="User3" />
                            </Items>
                        </telerik:RadComboBox>
                        <asp:Button runat="server" ID="Button1" Text="Save Settings" OnClick="Button1_Click"
                            Width="100px" />
                        <asp:Button runat="server" ID="Button2" Text="Load Settings" OnClick="Button2_Click"
                            Width="100px" /><br />
                    </div>
                    <div style="float: right;">
                        <asp:Image runat="server" ID="InfoImage" Visible="false" EnableViewState="false"
                            Style="float: left;" ImageUrl="~/Grid/Examples/Programming/SavingGridSettingsOnPerUserBasis/Img/info_icon.png" />
                        <asp:Label runat="server" ID="StatusLabel" EnableViewState="false" Style="float: left;
                            font-style: italic; padding: 5px 0 0 5px;">
                        </asp:Label>
                    </div>
                </div>
                <telerik:RadGrid runat="server" ID="RadGrid1" GridLines="None" ShowFooter="True"
                    DataSourceID="SqlDataSource1" AllowFilteringByColumn="True" AllowSorting="True"
                    ShowGroupPanel="True" AllowPaging="True" CellSpacing="0">
                    <MasterTableView AutoGenerateColumns="true" DataKeyNames="CustomerID" DataSourceID="SqlDataSource1"
                        EnableHeaderContextMenu="true">
                    </MasterTableView>
                    <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True">
                        <Resizing AllowColumnResize="true" />
                    </ClientSettings>
                </telerik:RadGrid>
            </fieldset>
        </telerik:RadAjaxPanel>
        <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1">
        </telerik:RadAjaxLoadingPanel>
        <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
            ProviderName="System.Data.SqlClient" SelectCommand="SELECT [CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City] FROM [Customers]"
            runat="server"></asp:SqlDataSource>
    </div>
    </form>
</body>
</html>
