Current Table is not converting to DataTable

Current Table is not converting to DataTable

Nate91Nate91 Posts: 2Questions: 0Answers: 0
edited May 2013 in General
So I have a current table that I have been trying to paginate and it comes out to be pretty difficult to paginate as is. I was looking for solutions and I came across Datatables. I have it installed and such into my project. I did the tutorial on setting up just the basic table and I was able to get that to work. I 'assumed" that all I had to do was exchange that id = 'table_id' and put it on my current table. I did that and all I got was the header reformatted and that was it. No pagination or any other of the DataTable options. Was my assumption wrong(too easy to be true)? Is there more I need to do to get it to work with my current table?

[code]

$(document).ready(function() {
alert('I am working'); //tests to see if this is being called
$('#table_id').dataTable( {
"sPaginationType": "full_numbers"
} );
});




[/code]





[code]




${message(code: 'User.username.label', default: 'Username')}



${message(code: 'User.id.label', default: 'ID')}


${message(code: 'User.timeStamp.label', default: 'Timestamp')}



${message(code: 'User.details.label', default: 'Details')}













${fieldValue(bean: audit, field: "username")}



${fieldValue(bean: audit, field: "id")}



${fieldValue(bean: audit, field: "timeStamp")}




Username: ${audit.username }

ID: ${audit.accountUuID }

EVENT TYPE: ${audit.eventType }

EVENT DETAILS: ${audit.eventDetails }

MESSAGE: ${audit.message }









[/code]


This is my existing table that I want converted over. I put exactly what the tutorial did on the bottom of this page to make sure I was calling everything correctly to this page and it worked out great, just doesn't work with this table. My tables can return results sizing from 0-5k+. I also get the 'infamous' "DataTables warning (table id = 'table_id'): Requested unknown parameter '0' from the data source for row 0" error that I have read online.

Any help would be greatly appreciated!

Thanks,

Nate

Replies

  • Nate91Nate91 Posts: 2Questions: 0Answers: 0
    Sorry about the double post! When I clicked post it glitched out on me =S. If a mod can remove this that would be great! My copied post can be found here http://datatables.net/forums/discussion/15643/current-table-is-not-converting-to-datatable

    Sorry for the inconvenience!
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Can you link to a test page showing the problem please.

    Allan
This discussion has been closed.