Hidding column
Hidding column
stephane.soares
Posts: 2Questions: 1Answers: 0
Hello,
Im trying put non visible first two columns. I do the same in other datatables and dont have problems.
what im doing wrong?
Waiting your feedback.
My code:
var tabelaLotesEncomenda = $('#tabelaLotesEncomenda').DataTable({
language: {
url: "//cdn.datatables.net/plug-ins/1.10.13/i18n/Portuguese.json"
},
data: medicamentosLotes,
responsive: true,
columns: [
{ title: "ID", data: "id_xml", className: "never" },
{ title: "intNumeroReceita", data: "intNumeroReceita", className: "never" },
//{ title: "strCodArtigo", data: "strCodArtigo" },
{ title: "Artigo", data: "strDescArtigo" },
{ title: "Quantidade", data: "fltQuantidade" },
{ title: "Quantidade Pendente", data: "fltQuantidadePend" },
{
title: "Adicionar Lote",
data: "strCodArtigo",
render: function(data, type, row) {
return "<button class='registarLote' data-artigo='" + data + "' data-artigo-desc='" + row.strDescArtigo + "' data-idEncomenda='" + aux_id_xml + "'>Click</button>";
//return '<button id="registarLote" onclick="modalRegistaLote()" class="registarLote" data-artigo="' + data + '"><i class="fa fa-search"></i> Pesquisar</button>';
},
}
]
});
EDIT: Code edited with Markdown code highlighting
This discussion has been closed.
Answers
Have you tried
columns.visible
?Kevin
Hello,
How i can use that to do this:
http://prntscr.com/kbpdxc
I want hide to button (+)
The
+
button is added by Responsive. If you don't want Responsive enabled on your table remove theresponsive: true
option.Allan