<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ 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>
    <script type="text/javascript">
        var initialized = false;
        function binding123(sender, args) {         
            if(!initialized)
                args.set_cancel(true);
        }
              
        function pageLoad() {
            initialized = true;     
            $find("RadGrid1").get_masterTableView().filter("ProductID", 1, "EqualTo");
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadGrid runat="server" ID="RadGrid1" AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true">
            <MasterTableView DataKeyNames="ProductID" ClientDataKeyNames="ProductID">
                <PagerStyle Mode="NextPrevAndNumeric" />
                <Columns>
                    <telerik:GridBoundColumn DataField="ProductID" HeaderText="ProductID" DataType="System.Int32">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" DataType="System.String">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitPrice" HeaderText="UnitPrice" DataType="System.Decimal"
                        DataFormatString="{0:C}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ReorderLevel" HeaderText="ReorderLevel" DataType="System.Int32">
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="Discontinued" HeaderText="Discontinued" DataType="System.Boolean">
                    </telerik:GridCheckBoxColumn>
                </Columns>
                <PagerStyle Mode="NumericPages" />                   
            </MasterTableView>                        
            <ClientSettings>
                <DataBinding SelectMethod="GetDataAndCount" Location="GridWcfService.svc" 
                    SortParameterType="Linq" FilterParameterType="Linq">
                </DataBinding>      
                <ClientEvents OnDataBinding="binding123" />          
            </ClientSettings>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>
