Hide column automatically from an HTML dynamic table with Javascript?


I have a problem with my dynamic table, I need that a column is not visible, when loading the page that column is not shown but when selecting the filters that are date and client, I paint with Javascript the data of my table and shows the column that hidden in HTML

To hide in HTML use Data-visible="False" and it works but at the time of loading the data not

HTML IS EAST                                                                      Description                     Part number                     Warehouse Id                     Warehouse                     Quantity                                                         

and MI JS Where I paint the table is a

 InsertaRenglon: function (item, index, arr) {
    var table = document.getElementById("tblInventarioId");
    var row = table.tBodies[0].insertRow();
    row.id = "tc" + item.Descripcion;
    var cell0 = row.insertCell(0);
    var cell1 = row.insertCell(1);
    var cell2 = row.insertCell(2);
    var cell3 = row.insertCell(3);
    var cell4 = row.insertCell(4);

    cell0.innerHTML = item.Descripcion;
    cell1.innerHTML = item.NumeroDeParte;
    cell2.innerHTML = item.AlmacenId;
    cell3.innerHTML = item.AlmacenDesc;
    cell4.innerHTML = "<input type='text' class = 'form-control input-sm jsTrim jsNumber' name='type' id='txt" +
        item.NumeroDeParte + "' value='" + item.Cantidad + "'style='width:50px '>";



asked by Ch3vi 18.05.2018 в 17:07

0 answers