0
I have the following structure in PHP
implementing 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 would like to know if there is a configuration of dataTable
allowing the concatenation of columns in the corpo da tabela
, and not in the header
Here’s the default setting I use on dataTable
:
if ($("#lst").length){
$("#lst").dataTable( {
"bJQueryUI" : true,
"sPaginationType" : "full_numbers",
"iDisplayLength": 10
});
}
But I believe that this does not actually create an effect of
colspan
, only increases column width– MarceloBoni