Skip to content

Problems Clearing Table and Updating New Data #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Screnhack opened this issue Nov 20, 2018 · 0 comments
Open

Problems Clearing Table and Updating New Data #84

Screnhack opened this issue Nov 20, 2018 · 0 comments

Comments

@Screnhack
Copy link

Screnhack commented Nov 20, 2018

problems when updating the table and loading other data I am updating the fields, I destroy the table and it does not let me collect the data I have selected I get an error
captura de pantalla de 2018-11-20 14-37-51

my code is as follows

ajax.detalleFactura(datos, {
                callback: function (data) {
                    $('#tablaColaboradores').DataTable().destroy();
                    if (data != null) {
                        console.log("datosFactura:", data);
                        datosFactura = data;
                        listadoConceptoFactura = data.listadoHomologado;
                        tablaLiqui = $('#tablaColaboradores').DataTable({
                            data: listadoConceptoFactura,
                            columnDefs: [
                                {
                                    targets: 0,
                                    checkboxes: {
                                        seletRow: true
                                    }
                                }
                            ],
                            select: {
                                style: 'multi'
                            },
                            order: [[1, 'asc']],
                            columns: [
                                {data: "consecutivo"},
                                {data: "descripcionConceptoOTipoPrueba"},
                                {data: "tipoConceptoFacturar"},
                                {data: "valor"},
                                {data: "descuento"},
                                {data: "periodoNominal"}
                            ]
                        });

                        $("#tabla_2").show();
                    } else {
                        $("#tabla_2").hide();
                        notificacion("Error", "No trae datos", "error");
                    }
                },
                timeout: 200000
            });

I collect the selected data as follows

var seleccionados = tablaLiqui.column(0).checkboxes.selected();

and I keep getting the error again and again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant