<%@ Page Title="" Language="C#" MasterPageFile="~/helpdesk/AD.master" AutoEventWireup="true" CodeBehind="Ad_Ou.aspx.cs" Inherits="helpdesk.helpdesk.Ad_Ou" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
     <div style="border:solid 1px #ccc;padding:10px; margin:10px  " class="form-inline">


          <link href="../javascript/datatables/datatables.min.css" rel="stylesheet" />
          <script src="../javascript/datatables/datatables.min.js"></script>
 
         
OU名称 <input type="text" class="form-control" id="key" />

路径名称 <input type="text" class="form-control" id="key2" />


         </div>



     <style>
     div.dataTables_wrapper div.dataTables_filter {
    text-align: left;
}
 </style>

    <asp:GridView runat="server" ID="gv" 
        ClientIDMode="Static" CssClass="table table-hover" 
         AutoGenerateColumns="false" AllowPaging="false" 
        GridLines="None" OnPreRender="gv_PreRender">

        
<Columns>
     
         

    <asp:TemplateField>
        <HeaderStyle Width="200px" />
               <HeaderTemplate>OU名称</HeaderTemplate>
               <ItemTemplate>
            <%#  ((AdItem)Container.DataItem).Name %>  
               </ItemTemplate>

           </asp:TemplateField>

      <asp:TemplateField>
               <HeaderTemplate>ADPath</HeaderTemplate>
               <ItemTemplate>
            <%#  ((AdItem)Container.DataItem).AdPath %>  
               </ItemTemplate>

           </asp:TemplateField>
     




</Columns>


    </asp:GridView>





    <script>
        $(document).ready(function () {
            $("#gv").DataTable({
                paging: true,
                order: [[ 0, "asc" ]],
                dom: "rtip",
                lengthMenu: [15]


            });



            var table = $('#gv').DataTable();

 


            $('#key').on('keyup', function () {
                table.columns(0).search(this.value).draw();
            });


            $('#key2').on('keyup', function () {
                table.columns(1).search(this.value).draw();
            });


        });




    </script>

    





</asp:Content>
