dataTable.ajax.reload(), reload undefined

dataTable.ajax.reload(), reload undefined

talleetallee Posts: 3Questions: 1Answers: 0

when i tried to use ajax.reload() to send the post request, Chrome showed that reload undefined. i don't know why, can anybody help? following is my javascript code

$(document).ready(function() { var dt = $('#example').dataTable( { "processing": true, "serverSide": true, "ajax": { "url": "/TranslatorsHX.ashx", "type": "POST", "data": function (d) { d.QueryTxt = $("#TxtQuery").val(); } }, "aoColumns": [ { "sClass": "center", "mDataProp": "ID" }, { "sClass": "center", "mDataProp": "Name" }, { "sClass": "center", "mDataProp": "language" } ] }); $("#BtnQuery").click(function () { dt.ajax.reload(); }); });

Answers

  • VishnuHBSVishnuHBS Posts: 20Questions: 2Answers: 0

    $(document).ready(function() {
    var table= $('#example').dataTable();
    } );

    table.fnDraw();

    it works for me..

    pls check it.

  • talleetallee Posts: 3Questions: 1Answers: 0

    i meant DataTable object works well, What Chrome showed was that reload is undefined.

  • talleetallee Posts: 3Questions: 1Answers: 0

    thanks, it works now

This discussion has been closed.