<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadGridFilterAmar.aspx.cs" Inherits="RadGridFilterAmar" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <script type="text/javascript">
            //Put your JavaScript code here.
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid1" DataSourceID="SqlDataSource1" Skin="WebBlue"
            AllowFilteringByColumn="True" AllowSorting="True" PageSize="15" OnItemDataBound="RadGrid1_ItemDataBound"
            OnUpdateCommand="RadGrid1_UpdateCommand"
            ShowFooter="True" AllowPaging="True" runat="server" GridLines="None"
            EnableLinqExpressions="False" CellSpacing="0">
            <MasterTableView Width="100%"
                DataSourceID="SqlDataSource1" HorizontalAlign="NotSet"
                AutoGenerateColumns="False" DataKeyNames="OrderID"
                AllowFilteringByColumn="True">
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"
                    Created="True">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle CssClass="MyImageButton"></ItemStyle>
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn DataField="OrderID"
                        FilterControlAltText="Filter idCol column" HeaderText="idCol" ReadOnly="True"
                        SortExpression="idCol" UniqueName="idCol">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Freight"
                        FilterControlAltText="Filter bondNo column" HeaderText="bondNo" SortExpression="bondNo" UniqueName="bondNo"
                        EditFormColumnIndex="0" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridDropDownColumn DataSourceID="SqlDataSource2" DataField="ShipName"
                        ListTextField="ShipName" ListValueField="ShipName"
                        UniqueName="transporter" SortExpression="transporter" HeaderText="transporter"
                        DropDownControlType="DropDownList" EditFormColumnIndex="1">
                    </telerik:GridDropDownColumn>
                    <telerik:GridBoundColumn DataField="ShipCountry" ReadOnly="True"
                        FilterControlAltText="Filter GRN column" HeaderText="GRN"
                        SortExpression="GRN" UniqueName="GRN" EditFormColumnIndex="3">
                    </telerik:GridBoundColumn>
                    <telerik:GridNumericColumn DataField="Freight" DataType="System.Int32"
                        FilterControlAltText="Filter numberOfUnits column" HeaderText="numberOfUnits"
                        SortExpression="numberOfUnits" UniqueName="numberOfUnits" EditFormColumnIndex="3">
                    </telerik:GridNumericColumn>
                    <telerik:GridHyperLinkColumn AllowSorting="False"
                        DataNavigateUrlFields="OrderID"
                        DataNavigateUrlFormatString="PrintGRN.aspx?id={0}&reprint=yes"
                        FilterControlAltText="Filter column column" Text="Reprint" UniqueName="column" ItemStyle-Font-Underline="true">
                        <ItemStyle Font-Underline="True"></ItemStyle>
                    </telerik:GridHyperLinkColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [OrderID], [OrderDate], [Freight], [ShipName], [ShipCountry] FROM [Orders]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT DISTINCT [ShipName] FROM [Orders]"></asp:SqlDataSource>
    </form>
</body>
</html>
