Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery datatable destroy and recreate

  $("#Table").DataTable().clear().destroy();
            $("#Table").dataTable({
                "sAjaxSource": '@Url.Action("YourMethod", "UrCOntrollerName")',
                "bServerSide": true,
                "bProcessing": false,
                "searching" : false,

                "columns": [
                    {
                        "data": "ID",
                        "autoWidth": true,
                        "searchable": false,
                        "mRender": function (arqs, type, data) {
                            return "<a href='#' onclick='RemoveCombine(this)' data-id='" + data.ID + "'  class='btn-round-sm' title='Remove' style='padding: 5px 5px 5px 5px;'><span>Remove</span></a>";
                        }
                    },
Comment

datatable destroy

jQuery("#LableDatatable").DataTable( {
  destroy: true, // add this line to distory 
  responsive: true,
  "ajax": {
  "url": url,
  "type": 'GET',
  "data": data
  }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript store array in localstorage 
Javascript :: save on focus lost sublime 
Javascript :: ReactDOM.render is no longer supported in React 18. Use createRoot instead 
Javascript :: jquery video play 
Javascript :: how to completely reload page in jquery 
Javascript :: jquery change font size 
Javascript :: angular rebuild 
Javascript :: hello world javascript 
Javascript :: js random id 
Javascript :: tolowercase javascript 
Javascript :: NullInjectorError: No provider for HttpClient! 
Javascript :: javascript voice reader 
Javascript :: $(document).ready | document.ready 
Javascript :: e vs backwards e math 
Javascript :: javascript remove space from two side of string 
Javascript :: js input trigger change event when set value with js 
Javascript :: datatable default sorting 
Javascript :: javascript get string between two characters 
Javascript :: javascript css link append 
Javascript :: wordpress echo admin ajax url 
Javascript :: get the current url javascript 
Javascript :: how to sort by newest document mongoose 
Javascript :: regex a-z javascript 
Javascript :: RegExp validation for password explained 
Javascript :: vanilla javascript axios 
Javascript :: choose jsp 
Javascript :: remove last character from string jquery 
Javascript :: close exit app react native 
Javascript :: import path in ES6 module 
Javascript :: onchange select dropdown jquery 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =