Refresh function not works

Refresh function not works

hugomeanahugomeana Posts: 18Questions: 0Answers: 0
edited December 2012 in General
Hello,

The fnDraw Function not works. I have this function

[code]
function DuplicaPrice(idprice){

$.get("prices.php", { idprice: idprice},

function(data){

alert('OK!');
oTable.fnDraw();
});
}
[/code]

but the table not refres.


My table declaration:

[code]
oTable = $('#prices').dataTable( {
"sDom": 'l<"clear">Tfrtip',
"bPaginate": true,
"iDisplayLength": 50,
"aaSorting": [[ 8, "asc" ]],
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"sAjaxSource": "prices.php"
...
...
...
[/code]


Please helpp !!
Tahnk you

Replies

  • allanallan Posts: 63,531Questions: 1Answers: 10,474 Site admin
    fnDraw doesn't do anything other than just redraw the table in its current state - so you shouldn't see any changes unless you have custom filtering which has changed.

    What exactly are you trying to do?

    Allan
  • hugomeanahugomeana Posts: 18Questions: 0Answers: 0
    I have a button and when I press it, I inserted a record in the database. After this, I need to refresh the table to see this new record. What can i do please?

    Than you!
  • hugomeanahugomeana Posts: 18Questions: 0Answers: 0
    ohhh SOLVED !!

    I use the fnReloadAjax function and now works !!
    Than you again!
This discussion has been closed.