Datatables row style only working on page one

Datatables row style only working on page one

EdGrantJEdGrantJ Posts: 1Questions: 0Answers: 0
edited November 2011 in General
I am using datatables to maintain database reference data and this is working for small tables where there are less than ten rows to display. However, if I select page two (e.g. rows 11 to 20) than the colour style is lost. Using firebug to inspect the rows (s) I can see that the class ui-widget-content has not been applied.

I am currently working with the complete database table download to display ten rows per page; i.e. not using ajax to get batches of ten.

Any idea why the style (class = ui-widget-content) is being lost?

Ed G.

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    How are you applying that class - presumably with an $().addClass() after the table has been initialised? If so, you need to use fnGetNodes - like in this example for events: http://datatables.net/release-datatables/examples/advanced_init/events_post_init.html

    Allan
This discussion has been closed.