Problems obtaining duplicate data records
Problems obtaining duplicate data records
mariale83
Posts: 2Questions: 1Answers: 0
I need to get the data in the table with help of two methods where obtendo records in the table (amount) but the values obtained are duplicates some records. I appreciate your support.
//------add records table--------
// p_array_contenido = ["11111111", "NOMBRE", "APELLIDO", "-- --", "<input type="text" id="1_1">", "<input type="text" id="1_2" maxlength="10">"]
$(p_table).dataTable().fnAddData( [
p_array_contenido
] );
//-----methods 1 - get data--------
var vj_tabla_objeto = $(vj_tabla_datos).DataTable(); //Se obtiene los datos de la tabla
var vj_data = vj_tabla_objeto.rows().data();
for(i = 0; i< vj_data.length; i++){
vj_ci = vj_data[i][0];
}
//-----methods 2 - get data--------
var vj_tabla_objeto = $(vj_tabla_datos).dataTable(); //Se obtiene los datos de la tabla
var vj_data = vj_tabla_objeto.fnGetData();
for(i = 0; i< vj_data.length; i++){
vj_ci = vj_data[i][0];
}
This discussion has been closed.
Answers
I solved it by adding data: