Individual detail text for each row
Individual detail text for each row
joejames800
Posts: 6Questions: 0Answers: 0
I found this code below on http://datatables.net/release-datatables/examples/api/row_details.html
But when I make a change it applies it to all the row details... How do you change the row details to have individual detail text for each row? Could someone please provide an example?
[code]/* Formating function for row details */
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '';
sOut += 'Rendering engine:'+aData[1]+' '+aData[4]+'';
sOut += 'Link to source:Could provide a link here';
sOut += 'Extra info:And any further details here (images etc)';
sOut += '';
return sOut;
}
[/code]
But when I make a change it applies it to all the row details... How do you change the row details to have individual detail text for each row? Could someone please provide an example?
[code]/* Formating function for row details */
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '';
sOut += 'Rendering engine:'+aData[1]+' '+aData[4]+'';
sOut += 'Link to source:Could provide a link here';
sOut += 'Extra info:And any further details here (images etc)';
sOut += '';
return sOut;
}
[/code]
This discussion has been closed.
Replies
Allan
Do you understand what aData is in the context of that function? It might help if you 'console.log(aData)' and have a look at the Firebug console to see what aData is (its the data fromt he row that is being "opened".
Allan