Rowspan tbody td

Rowspan tbody td

kanikokaniko Posts: 1Questions: 0Answers: 0
edited October 2013 in General
Hi everyone,

1)I'm trying to modify a table, and put in some td a rwospan (in depends on the data that I'm getting)

I'm using the fnRowCallback function:

fnRowCallback: function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {

var rowSpan = aData.elements.length;


for ( var x = 0; x < rowSpan; x++) {


var tr = document.createElement('tr');
var a = document.createElement('td');
$(a).html(aData.elements[x].name);

var b = document.createElement('td');
$(b).html( aData.elements[x].type);

$(tr).append(a);
$(tr).append(b);

$(nRow).append(tr);
}




return nRow;
}


1.1.)is this the best way to create it?

2) If A want to set up the columns names, but I will create the data for this columns names with the previous function, how can I do this ?

Mnay thanks
This discussion has been closed.