How to clear table

How to clear table

hybluseahyblusea Posts: 8Questions: 0Answers: 0
edited November 2012 in General
Initialization Datatables, and return an object : [code]var oTable = $('#example').dataTable();[/code]

I try call oTable.fnClearTable() to clear table. But the data still exists , and after calling fnClearTable(), the data loading method automatically called again

Replies

  • hybluseahyblusea Posts: 8Questions: 0Answers: 0
    up ...
  • girishmrgirishmr Posts: 137Questions: 0Answers: 0
    Sometimes I use the following function to destroy the table. Hope this helps.

    [code]
    //nTable: Your table instance
    function checkDTInstance( nTable ) {
    var table = $.fn.dataTable.fnTables(true);
    if(table.length > 0) {
    var settings = $.fn.dataTableSettings;
    for ( var i=0, iLen=settings.length ; i
This discussion has been closed.