I'm using the treetable plugin and I want to dynamically load some rows of data from a Taffy db previously populated from an xml file. I've verified that loadBranch works fine on the root of the table using "null" as the node but I can't seem to make it child of the first row.
HTML:
<table id='data_tree'>
<tr class="branch" data-tt-id="1">
<td>Studies</td>
</tr>
</table>
Javascript:
$(window).load(function(){
studies_db().each( function (record,recordnumber) {
$("#data_tree").treetable("loadBranch",1,
"<tr>"+
"<td><b>Accession:</b> "+record.accession+"<br>"+
"<b>Title:</b> "+record.title+"<br>"+
"<b>Authors:</b> "+record.authors+"<br>"+
"<b>Release date: </b>"+record.date+"<br>"+
"<b>Number of markers: </b>"+record.samples+"<br>"+
"</td></tr>")
});
});