Jspdf Autotable : Target Style For Specific Row Of A Table
I am using jsPDF AutoTable Plugin for my table pdf. My sources: #javaScriptIncludeTag('jspdf.min.js')# #javaScriptIncludeTag('jspdf.plugin.autotable.js')# My sources are from: ht
Solution 1:
Try the below code to give the styles to cells of particular row.
doc.autoTable({
html: '#table',
didParseCell(data) {
if (data.cell.row.index === 0) {
data.cell.styles.textColor = [255, 255, 255];
data.cell.styles.fillColor = '#FF5783';
}
}
})
Solution 2:
Try this :
$(document).ready(function()
{
$('tr').find('td').eq(0).addClass('highlight');
});
Example : https://jsfiddle.net/bneen5rc/
Post a Comment for "Jspdf Autotable : Target Style For Specific Row Of A Table"