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

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!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 runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            <telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1" DataSourceID="SqlDataSource1"
                Width="760px" AllowFilteringByColumn="True" AllowSorting="True" PageSize="15"
                ShowStatusBar="true" ShowFooter="True" AllowPaging="True" runat="server" GridLines="None">
                <PagerStyle Mode="NextPrevAndNumeric" />
                <GroupingSettings CaseSensitive="false" />
                <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True"
                    ShowFooter="True" TableLayout="Auto">
                    <Columns>
                        <telerik:GridNumericColumn DataField="OrderID" HeaderText="OrderID" SortExpression="OrderID"
                            UniqueName="OrderID" FilterControlWidth="40px" AutoPostBackOnFilter="true" CurrentFilterFunction="equalto"
                            ShowFilterIcon="false">
                        </telerik:GridNumericColumn>
                        <telerik:GridBoundColumn FilterControlWidth="105px" DataField="ShipName" HeaderText="ShipName"
                            SortExpression="ShipName" UniqueName="ShipName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                            ShowFilterIcon="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridDateTimeColumn FilterControlWidth="50px" DataField="OrderDate" HeaderText="OrderDate"
                            SortExpression="OrderDate" UniqueName="OrderDate" PickerType="None" DataFormatString="{0:d}">
                        </telerik:GridDateTimeColumn>
                        <telerik:GridDateTimeColumn FilterControlWidth="120px" DataField="ShippedDate" HeaderText="ShippedDate"
                            SortExpression="ShippedDate" UniqueName="ShippedDate" PickerType="DatePicker"
                            DataFormatString="{0:D}">
                            <HeaderStyle Width="160px" />
                        </telerik:GridDateTimeColumn>
                        <telerik:GridBoundColumn FilterControlWidth="50px" DataField="ShipCountry" HeaderText="ShipCountry"
                            SortExpression="ShipCountry" UniqueName="ShipCountry">
                        </telerik:GridBoundColumn>
                        <telerik:GridMaskedColumn FilterControlWidth="50px" DataField="ShipPostalCode" HeaderText="ShipPostalCode"
                            SortExpression="ShipPostalCode" UniqueName="ShipPostalCode" Mask="#####">
                            <FooterStyle Font-Bold="true" />
                        </telerik:GridMaskedColumn>
                        <telerik:GridNumericColumn HeaderStyle-Width="90px" FilterControlWidth="50px" DataField="Freight"
                            DataType="System.Decimal" HeaderText="Freight" SortExpression="Freight" UniqueName="Freight"
                            Aggregate="Sum">
                            <FooterStyle Font-Bold="true" />
                        </telerik:GridNumericColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    <Scrolling AllowScroll="false" />
                </ClientSettings>
            </telerik:RadGrid>
            <br />
            <asp:Button Text="PostBack" runat="server" ID="Button1" CssClass="button" Style="margin: 0 20px 0;" />
            Click "PostBack" to see the state of the grid is preserved.
            <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
                ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Orders" runat="server">
            </asp:SqlDataSource>
        </div>
    </form>
</body>
</html>
