remove sort icons when using row.add function
remove sort icons when using row.add function

Hi guys, I have this code to add rows to a datatable:
function atualizar_dtLinhaFatura( dados )
{
dtLinhaFatura.clear().draw();
$.each(dados.data, function(index, val)
{
//alert(val.ref);
dtLinhaFatura.row.add([
val.ref,
val.design,
"<input type='text' class='form-control txtQdtLinhaFatura' value='" + val.qtd + "'>",
val.pvf,
val.iva,
val.pvf_total,
val.desconto,
val.PVF_Liq_Total,
{
data :'',render: function ( data, type, row, meta )
{
return "<button class='btn btn-info btn-sm remove-linhafatura'><i class='fa fa-minus'></button>";
},
'bSortable': false,
},
]).draw();
});
}
All is working but last column don't. I am getting [object Object]. Can someone point me the right way to remove the srting icons when adding rows? Many thanks!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
This code:
Goes into either your
columns
orcolumnDefs
option. Therow.add()
API is looking for an array of values but is not expecting config options.Kevin