hatake kakashi

hatake kakashi

  • NA
  • 10
  • 1.3k

My datatable is not working. I am trying to use with gridview.

Jul 18 2020 2:17 PM
MY data table is not working, the search button and pagination is not applied for gridview table. Please anyone help me in this.
 
Code -
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dashboard.aspx.cs" Inherits="WebApplication1.dashboard" %>  
  2. <!DOCTYPE html>  
  3. <html xmlns="http://www.w3.org/1999/xhtml" >  
  4. <head runat="server" style="background-color: gainsboro;">  
  5. <meta charset="utf-8">  
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">  
  7. <meta name="viewport" content="width=device-width, initial-scale=1">  
  8. <link rel="icon" href="img/fav-icon.png" type="image/x-icon" />  
  9. <title>Review</title>  
  10. <link href="css/font-awesome.min.css" rel="stylesheet">  
  11. <link href="vendors/stroke-icon/style.css" rel="stylesheet">  
  12. <link href="vendors/flat-icon/flaticon.css" rel="stylesheet">  
  13. <link href="css/bootstrap.min.css" rel="stylesheet">  
  14. <link href="vendors/revolution/css/settings.css" rel="stylesheet">  
  15. <link href="vendors/revolution/css/layers.css" rel="stylesheet" />  
  16. <link href="vendors/revolution/css/navigation.css" rel="stylesheet">  
  17. <link href="vendors/animate-css/animate.css" rel="stylesheet">  
  18. <link href="vendors/magnify-popup/magnific-popup.css" rel="stylesheet">  
  19. <link href="vendors/owl-carousel/owl.carousel.min.css" rel="stylesheet">  
  20. <link href="vendors/bootstrap-datepicker/bootstrap-datetimepicker.min.css" rel="stylesheet">  
  21. <link href="vendors/bootstrap-selector/bootstrap-select.css" rel="stylesheet">  
  22. <link href="vendors/lightbox/simpleLightbox.css" rel="stylesheet">  
  23. <link href="css/style.css" rel="stylesheet">  
  24. <!--<link href="css/responsive.css" rel="stylesheet">-->  
  25. <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">  
  26. <script src="https://code.jquery.com/jquery-1.10.2.js"></script>  
  27. <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>  
  28. <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>  
  29. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>  
  30. <script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>  
  31. <link href=" https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css" rel="stylesheet"/>  
  32. <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>  
  33. <script defer src="script.js"></script>  
  34. <script>  
  35. $(function () {  
  36. $("#datepicker-13").datepicker();  
  37. });  
  38. </script>  
  39. <script>  
  40. $(function () {  
  41. $("#datepicker-14").datepicker();  
  42. });  
  43. </script>  
  44. <script>  
  45. $(document).ready(function () {  
  46. var table = $('#gvContact1').DataTable();  
  47. });  
  48. </script>  
  49. </head>  
  50. <body>  
  51. <form id="form2" runat="server">  
  52. <section class="main_slider_area main_s_banner">  
  53. <br />  
  54. <asp:Label ID="LblRepresentativeDetail" runat="server" Text="WELCOME"></asp:Label>  
  55. <div style="position: relative; width: inherit; height: inherit">  
  56. <asp:GridView ID="gvContact1" runat="server" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" Height="271px" GridLines="Vertical" AutoGenerateColumns="False" align="center" Width="1175px" >  
  57. <AlternatingRowStyle BackColor="White" />  
  58. <Columns>  
  59. <asp:BoundField DataField="ContactID" HeaderText ="ID" />  
  60. <asp:BoundField DataField="SupportRepresentative" HeaderText ="Representative Name" />  
  61. <asp:BoundField DataField="Activity" HeaderText ="Activity" />  
  62. <asp:BoundField DataField="Mission" HeaderText ="Mission" />  
  63. <asp:BoundField DataField="Country" HeaderText ="Country" />  
  64. <asp:BoundField DataField="City" HeaderText ="City" />  
  65. </Columns>  
  66. </asp:GridView>  
  67. <br />  
  68. </div>  
  69. <div >  
  70. <br />  
  71. </div>  
  72. </section>  
  73. <script src="js/bootstrap.min.js"></script>  
  74. <script src="vendors/bootstrap-selector/bootstrap-select.js"></script>  
  75. </form>  
  76. </body>  
  77. </html>  

Answers (7)