I have the following structure in PHP
that implements a table:
foreach ($varConsulta as $lin) {
$var1= $varConsulta[$i]['1'];
$var2= $varConsulta[$i]['2'];
$var3= $varConsulta[$i]['3'];
$varFase= $varConsulta[$i]['FASE'];
$linhas = "";
$linhas .= "<td style='padding: 10px;'>" . utf8_encode($var1) . "</td>";
$linhas .= "<td style='padding: 10px;'>" . utf8_encode($var2) . "</td>";
$linhas .= "<td style='padding: 10px;'>" . utf8_encode($var3) . "</td>";
switch ($varFase) {
case 1:
$linhas .= "<td colspan='2'>ALUNO NÃO APROVADO</td>";
break;
case 2:
$linhas .= "<td style='padding: 10px;'><select id='".$var1."' name='".$var1."'><option value=''></option><option value='1'>SIM</option><option value='0'>NÃO</option></select></td>";
$linhas .= "<td style='text-align: center;'><a href='#' onclick='comparecimento(".$var1.")' class='Adicionar' title='Adicionar'>.</a></td>";
break;
case 3:
$linhas .= "<td colspan='2'>AGUARDANDO RESULTADO</td>";
break;
}
echo "<tr>" . $linhas . "</tr>";
$i++;
}
I wonder if there is a dataTable
setting that allows column concatenation in corpo da tabela
, not header
Here is the default setting I use in dataTable
:
if ($("#lst").length){
$("#lst").dataTable( {
"bJQueryUI" : true,
"sPaginationType" : "full_numbers",
"iDisplayLength": 10
});
}