<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Filtering.aspx.cs" Inherits="Filtering" %>
<%@ 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>

</head>
<body>
    <form id="form1" runat="server">
    <div><asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager>
    
    <telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1" DataSourceID="SqlDataSource1"
            Width="760px" Skin="Vista" AllowFilteringByColumn="True" AllowSorting="True"
            PageSize="15" ShowStatusBar="true" ShowFooter="True" AllowPaging="True" runat="server"
            GridLines="None" EnableLinqExpressions="false"
            OnItemDataBound="RadGrid1_ItemDataBound" OnItemCreated="RadGrid1_ItemCreated" OnItemCommand="RadGrid1_ItemCommand">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True"
                ShowFooter="True" TableLayout="Auto" HeaderStyle-Font-Bold="true">
                <Columns>
                    <telerik:GridNumericColumn DataField="OrderID" HeaderText="OrderID" SortExpression="OrderID"
                        UniqueName="OrderID">
                    </telerik:GridNumericColumn>
                    <telerik:GridBoundColumn DataField="ShipName" HeaderText="ShipName" SortExpression="ShipName"
                        UniqueName="ShipName">
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn DataField="OrderDate" HeaderText="OrderDate" SortExpression="OrderDate"
                        UniqueName="OrderDate" PickerType="None" DataFormatString="{0:d}">
                    </telerik:GridDateTimeColumn>
                    <telerik:GridDateTimeColumn DataField="ShippedDate" HeaderText="ShippedDate" SortExpression="ShippedDate"
                        UniqueName="ShippedDate" PickerType="DatePicker" DataFormatString="{0:D}">
                        <HeaderStyle Width="160px" />
                    </telerik:GridDateTimeColumn>
                    <telerik:GridBoundColumn DataField="ShipCountry" HeaderText="ShipCountry" SortExpression="ShipCountry"
                        UniqueName="ShipCountry">
                    </telerik:GridBoundColumn>
                    <telerik:GridMaskedColumn DataField="ShipPostalCode" HeaderText="ShipPostalCode"
                        SortExpression="ShipPostalCode" UniqueName="ShipPostalCode" Mask="#####">
                        <FooterStyle Font-Bold="true" />
                    </telerik:GridMaskedColumn>
                    <telerik:GridNumericColumn DataField="Freight" DataType="System.Decimal" HeaderText="Freight"
                        SortExpression="Freight" UniqueName="Freight" Aggregate="Sum">
                        <FooterStyle Font-Bold="true" />
                    </telerik:GridNumericColumn>
                </Columns>
            </MasterTableView><FilterMenu></FilterMenu>
            <GroupingSettings CaseSensitive="true"></GroupingSettings>
            <ClientSettings>
                <Scrolling AllowScroll="false" />
            </ClientSettings>
            <PagerStyle />
        </telerik:RadGrid>
<asp:Button ID="Button1" Text="PostBack!" CssClass="button" Style="margin: 10px 22px 10px 0px"
runat="server"></asp:Button>
        Click PostBack to see the state of the grid is preserved.
        <br />
        <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
            ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Orders" runat="server">
        </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>
