columns.name & column selector not working
columns.name & column selector not working
veendz
Posts: 1Questions: 1Answers: 0
Hello, I was just trying the new DataTables 1.10. I tried to use name as index instead of integer index so that I can use column(string:name) as column selector.
Here is my code:
var oTable;
$(document).ready(function() {
oTable = $('#example').DataTable({
'columns' : [
{'name' : 'name'},
{'name' : 'position'}
]
});
} );
I just followed the example but I kept getting this error: "Uncaught TypeError: Cannot read property 'mData' of undefined ".
When I changed "columns" to "column", I got no more error but I can't use oTable.column('position:name').data() as column selector. Please help!
This discussion has been closed.
Answers
Can you link to a test page showing the issue please? Do you only have two columns in the table?
Allan