Datatable to prevent the page from deleting jquery columns

0

I have created a datatable , everything works perfect, the problem is insert data by input:text my problem starts when I move between pagination since it deletes the rows with data that the textbox carries, that is to say when I move to the page 2, the td is deleted to create the new ones. Because I am using fields input:hidden it deletes them also avoiding sending the array of inputs to save, that is, it only saves me the data of the page in which I am. Is there a way to paginate the records without having to delete the information each page?

    
asked by DoubleM 24.10.2018 в 19:10
source

1 answer

0

To go through the entire table and not only the current page uses the function of iterator ()

dtTabla.rows().iterator('row', function (context, index) {
    var node = $(this.row(index).node());
    lstid.push({
       id: node.find("div").data().id,
       numero: node.find(":eq(0)").text(),
       fecha: node.find(":eq(4)").text()
    });
});
    
answered by 24.10.2018 в 19:30