Hidding column

Hidding column

stephane.soaresstephane.soares Posts: 2Questions: 1Answers: 0
edited July 2018 in DataTables

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

Answers

Sign In or Register to comment.