V ) DataTable (Searchable)

                                                     * DataTable (Searchable Gridview) *

  • Datatable is provide serchable concept in a Gridview .
  • It is a Pre Defined Library
  • Download the datable library and store in project folder .
     Step :- create a page -- paste file in gridview source 

 <head runat="server">

    <title></title>
   <%-- <paste 8 file head tag >--%>

    <link href="datatables/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
    <link type="text/css" rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css" />
     <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css" />
     <script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.js"></script>
     <script type="text/javascript" src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script>
     <script src="datatables/js/jquery.dataTables.min.js" type="text/javascript"></script>
      <script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js" type="text/javascript"  charset="utf8"></script>
      <script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js"  type="text/javascript" charset="utf8"></script>

</head>

            

 <%-- Paste 1 java file After </form> close--%>

    <script type="text/javascript">
    $(document).ready(function () {
        $('#<%= GridView1.ClientID%>').prepend($("<thead></thead>").append($("#<%= GridView1.ClientID%>").find("tr:first"))).DataTable({
            stateSave: true,
        });
    });






Comments

Popular posts from this blog

DATA CONTROL ( Gridview , Repeater , Formview , DataList , Detailsview , Listview )

Z 5 ) MVC (Model view Controller)

Z 8 ) MVC HTMLHELPER METHOD AND ACTIONLINK (how to use css ,atrributes,style in css)