Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81986

td.details-control open an other table

$
0
0

I created a column td.details-control to show a to show something like a log in other table but i don't how to get td's id and filter the table by it. When I click on td.details-control shows all the table's values.

js
$('#cliente').on( 'click', 'td.details-control', function () {
document.getElementById('historico').style.display='block';

} );

var table = $('#venda').DataTable( {
    dom: 'Bfrtip',
    ajax: 'controller/controller_historico.php',
    columns: [
        {
            "data": "cliente.nome"
        },
        {
            "data": "vendedor.nome"
        },
        {
            "data": "venda.dta_venda"
        },
        {
            "data": "venda.valor_total_pago"
        },
        {
            "data": "venda.valor_total_liquido"
        }
    ],
    select: true,
    buttons: [
    ]
   }
} );

html

Histórico de compras do cliente

Cliente Vendedor Data da Compra Valor Total Pago Valor Líquido

Viewing all articles
Browse latest Browse all 81986

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>