var undefined
var undefined
rrzavaleta
Posts: 78Questions: 52Answers: 2
I am using columns using joins
columns: [
{ data: "ING_ASEG_BANCO.ID"
,width: "50%"
},
{ data: "ING_BANCO.NOM_BANCO"
,width: "50%"
},
{ data: "ING_ASEG_BANCO.CUENTA_BANCO"
,width: "50%"
}
I usually use this function to clear , with a personalized message to know that I'm erasing field
$('#ing_campoinferior').on('dblclick', 'td', function (e) {
var row = $(this).parents("td")[0];
var aPos = oTable.fnGetPosition(this);
var cta_banco = oTable.fnGetData(aPos[0])["ID"];
e.preventDefault();
editor
.title( "BORRAR "+ cta_banco)
.message('ADVERTENCIA : Esta seguro que desea borrar: ' + cta_banco)
.buttons( { "label": "Borrar : " + cta_banco, "fn": function () { editor.submit() } } )
.remove( $(this).closest('tr') );
} );
variable cta_banco me messages appear as "undefined" .
How do I can show the name of the column or a cell?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I would suggest using the DataTables 1.10 API methods rather than the old fnGetPosition and fnGetData options. Specifically, you might use:
I think the bit you are missing is accessing the nested data, since
ID
is a property of a sub-object.Allan