Redesenhar datatables depois de usar ajax para atualizar o conteúdo da tabela?
Redesenhar datatables depois de usar ajax para atualizar o conteúdo da tabela?
joao_oliveira
Posts: 32Questions: 0Answers: 0
Como posso redesenhar datatables depois de usar ajax para atualizar o conteúdo da tabela?
This discussion has been closed.
Replies
Also this is a predominantly English forum - you are far more likely to get help if you pose your questions in English, even if you just run them through Google translate.
Allan
$(document).ready(function() {
var oTable = $('#tbleitos').dataTable( {
"bPaginate": false,
"bLengthChange": false,
"bFilter": false,
//CLASSIFICAÇÃO DE COLUNAS
"bSort": false,
"bInfo": false,
//LARGURA INTELIGENTE DA COLUNA
"bAutoWidth": false,
"aoColumns" : [ {
"sWidth": "10px"},
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null],
"bProcessing": false,
"bServerSide": true,
//ATUALIZAÇÃO EM REAL-TIME
"sAjaxSource": "consulta_cirurgias.php?sEcho=1" } );
setInterval(function()
{
//oTable.fnReloadAjax("consulta_teste.php?sEcho=1");
oTable.fnDraw();
//$('table.dataTable td').css('font-size', 70);
},120000);
} );
Allan
That is wrong.
Also, thinking about it, just use fnDraw since you have server-side processing enabled.
Allan
I want to display two different tables each minute. Can I use FnDraw?
What was wrong with the method of showing two different tables?