<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!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>
    <style type="text/css">
        html.rfdButton a.rfdSkinnedButton
        {
            vertical-align: middle;
            margin: 0 0 0 5px;
        }
    </style>
</head>
<body class="BODY">
    <form runat="server" id="mainForm" method="post">
    <!-- content start -->
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" ControlsToSkip="Scrollbars, Zone" />
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <div class="bigModule">
        <div class="bigModuleBottom">
            <div class="title" style="height: 40px;">
                Make changes to the grid by applying filter/group-by/sort expressions. Reorder and
                resize columns, or show/hide columns using the header context menu. Then, save the
                settings and choose a different user from the combo. Make additional changes and
                save these as well. Finally, you can choose a user from the combo box and restore
                the settings associated with this user.
            </div>
        </div>
    </div>
    <telerik:RadAjaxPanel runat="server" ID="AjaxPanel1" 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: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" PageSize="10">
                <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" />
                </ClientSettings>
            </telerik:RadGrid>
        </fieldset>
    </telerik:RadAjaxPanel>
    <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" />
    <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>
    <!-- content end -->
    </form>
</body>
</html>
