Search
 
SCRIPT & CODE EXAMPLE
 

PHP

jquey datatables

HTML
1
2
3
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.4/css/jquery.dataTables.css">
  
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.js"></script>
Comment

using datatable

//html
<table id="table" class="table table-striped table-bordered dt-responsive display nowrap" style="width: 100%!important;">
  <thead class="thead-light"></thead>
</table>

//js
var table = $('#table').DataTable({
    processing: true,
    searching : true,
    paging    : true,
    pageLength: 25,
    ordering  : false,
    data      : data,
    columns: [
        {data: 'id', title: '#'},
        {data: 'name', className: "text-center", title: 'Name'},
        {
          data: function(row){
            return "</a><a class='ui icon blue button' href='/name/view/" + row.id + "'><i class='fas fas fa-search'></i></a>&nbsp;&nbsp;&nbsp;<a class='ui icon blue button' href='/name/" + row.id + "'><i class='fas fa-pencil-alt'></i></a>"
          },
          searchable: false,
          orderable : false,
          className: "text-center",
          title: 'Actions'
        },
    ],
    lengthMenu: [
        [ 25, 50, -1 ],
        [ '25 rows', '50 rows', 'Show all' ]
    ]
  })

jQuery('.dataTable').wrap('<div class="dataTables_scroll" />');

//style
.dataTables_scroll
{
    overflow:auto;
}
Comment

datatable in html

1
2
3
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.css">

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.js"></script>
Comment

DataTables

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.4/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.js"></script>
Comment

datatable

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.22/datatables.min.css"/>
 
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.22/datatables.min.js"></script>
Comment

datatable in c#

String[] arr = new String[] { "a", "b" };
            DataTable dt = new DataTable();
            dt.Columns.Add("name");
            dt.Columns.Add("other");
            dt.Rows.Add(arr);

            foreach (DataRow r in dt.Rows)
            {
                Console.WriteLine(r["name"].ToString() + " - " + r["other"].ToString());
            }
Comment

datatables

datatable(m, escape = FALSE)
Comment

PREVIOUS NEXT
Code Example
Php :: Laravel return empty relationship on model when condition is true 
Php :: how to excluse csrf in a route laravel 
Php :: make controller and model laravel 
Php :: laravel new line in session flash message 
Php :: get woocommerce my account page url 
Php :: How to install or setup sanctum for laravel api authentication 
Php :: Get data from array (from an API) in Laravel 
Php :: woocommerce set default shipping country 
Php :: show uploaded image in php 
Php :: wp_query custom post type 
Php :: php require once 
Php :: twig in array 
Php :: MySQL table in new page after click php 
Php :: PHP - json_encode() 
Php :: connect php in sql server 
Php :: Woocommerce Changing the Entry Title of the Custom Endpoint 
Php :: Laravel SPA cors 
Php :: wp large medium large 
Php :: php fake stripe client 
Php :: laravel email validation 
Php :: accept method in jquery 
Php :: Laravel 9 Mail File 
Php :: apt-get install php wordpress extensions 
Php :: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given 
Php :: last index of array in laravel 
Php :: wp get_results count 
Php :: phpmailer doesnt work on infinityfree 
Php :: laravel collection forPage 
Php :: php preplace 
Php :: create a table using query 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =