Dynamic Configured dataTable

Dynamic Configured dataTable

ale123ale123 Posts: 4Questions: 0Answers: 0
edited September 2010 in General
Hi, I have a problem when I put columns for javascript, the error is: "oColunm is undefine", I have this code:

A class jsp that include a js.

Example.jsp


.......


.....


Ex.js

//Complete the Table
var str="";
str += "Campo1";
str += "Campo2";
str += "Campo3";
str += "Campo4";
str += "Campo5";
str += "";

for (var i = 0; i < list.length; i++){

str += "" + list.campo1 + "";
str += "" + list.campo2 + "";
str += "" + list.campo3 + "";
str += "" + llist.campo4 + "";
str += "" + llist.campo5 + "";


}
}

document.getElementById('tablaExample').innerHTML = str;
$('#tablaDeTransacciones').dataTable( {
"sPaginationType": "full_numbers",
} );

How can configured dataTables for do this? The data for the table is taken for the server using dwr.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    It looks like you need thead and tbody tags as described here: http://datatables.net/usage/#prerequisites

    Allan
This discussion has been closed.