Style Last Row Only (Not Every Last Row On Every Page)

Style Last Row Only (Not Every Last Row On Every Page)

murday1983murday1983 Posts: 29Questions: 12Answers: 0
edited March 2019 in Free community support

I have managed to find the last row in my DataTable using the following code

"initComplete": function () {
     var last_row = existingRuleTable.row(':last').data();
     console.log(last_row);
}

But now i'm stuck, i need to apply css to this row **ONLY ** not every last row on every page and no idea how to do this, i first though about adding an ID attribute to the last row only but again no idea on how to do this.

Tried the following but none work and cause an error so i could then add css finding the ID

$(last_row).attr('id', 'lastRow');
$(last_row.row()).attr('id', 'lastRow');

Please try and help, been 3days of googling trying to do this and losing the will to live, how hard can it be.

Just to point out please provide code as i and completely newby to DataTables and after this maybe the last time i use them as they aint easy to use at all


As you can see i am getting the last row

But everythign i try i get a

...is not a function
error message displayed

all i'm trying to the do is highlight the very last data row

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.