Unable to add row id with RowId option

Unable to add row id with RowId option

neirocneiroc Posts: 2Questions: 0Answers: 0
edited June 2016 in Free community support

I'm trying to add an id to each row with the releated option RowId.
My server returns this json:

{"data":
[{"id":"38","id_commessa":"44","data":"2016-05-02", "operatore":"Iuliana", "sede":"", "ore_std":"2", "ore_extra":"0", "ore_fest":"0", "ore_sabato":"0", "spese":"0", "km":"0", "euro_pastog":"0", "total":"2", "cliente":"PSC ","commento":"14457 ","team_leader":"NO"}, ...]

In Datatable initialization in have :
rowId : " id";
but doesmt works, why?
Any helps wil be appreciated.

Replies

  • neirocneiroc Posts: 2Questions: 0Answers: 0
    edited June 2016

    I need it to know which row remove or update after edit in client-side mode.
    For now, i resolve with this

    $('#myTable').on( 'click', 'tr', function () {
    rowNumber = table1.rows( { order: 'applied', filter: 'applied' } ).nodes().indexOf( this );
    } );

This discussion has been closed.