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

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
    <title>ASP.NET Grid Demo - Persisting Grid Settings</title>
    <style type="text/css">
        html.rfdButton a.rfdSkinnedButton
        {
            vertical-align: middle;
            margin: 0 0 0 5px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" ControlsToSkip="Scrollbars, Zone">
    </telerik:RadFormDecorator>
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel" LoadingPanelID="LoadingPanel1">
        <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>
                    <telerik:RadComboBoxItem Text="User2" Value="User2"></telerik:RadComboBoxItem>
                    <telerik:RadComboBoxItem Text="User3" Value="User3"></telerik:RadComboBoxItem>
                </Items>
            </telerik:RadComboBox>
            <asp:Button runat="server" ID="Button1" Text="Save Settings" OnClick="Button1_Click"
                Width="130px"></asp:Button>
            <asp:Button runat="server" ID="Button2" Text="Load Settings" OnClick="Button2_Click"
                Width="130px"></asp:Button><br />
        </div>
        <div style="float: right;">
            <asp:Image runat="server" ID="InfoImage" Visible="false" EnableViewState="false"
                Style="float: left;"></asp:Image>
            <asp:Label runat="server" ID="StatusLabel" EnableViewState="false" Style="float: left;
                font-style: italic; padding: 5px 0 0 5px;">
            </asp:Label>
        </div>
        <div class="qsf-clear-float" style="margin-bottom: 20px">
        </div>
        <telerik:RadGrid runat="server" ID="RadGrid1" GridLines="None" ShowFooter="True"
            DataSourceID="SqlDataSource1" AllowFilteringByColumn="True" AllowSorting="True"
            ShowGroupPanel="True" AllowPaging="true" PageSize="10" OnItemCreated="CustomizedGridPagerSize">
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="CustomerID" DataSourceID="SqlDataSource1"
                EnableHeaderContextMenu="true">
                <Columns>
                    <telerik:GridBoundColumn DataField="CustomerID" DefaultInsertValue="" HeaderText="CustomerID"
                        ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CompanyName" DefaultInsertValue="" HeaderText="CompanyName"
                        SortExpression="CompanyName" UniqueName="CompanyName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactName" DefaultInsertValue="" HeaderText="ContactName"
                        SortExpression="ContactName" UniqueName="ContactName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactTitle" DefaultInsertValue="" HeaderText="ContactTitle"
                        SortExpression="ContactTitle" UniqueName="ContactTitle">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="City" DefaultInsertValue="" HeaderText="City"
                        SortExpression="City" UniqueName="City">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True">
                <Resizing AllowColumnResize="true"></Resizing>
            </ClientSettings>
        </telerik:RadGrid>
        <asp:Button runat="server" Text="psothack" />
    </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>
    </form>
</body>
</html>
