restyle pagination and info

restyle pagination and info

I wrote a jscript to modify the pagination links and table info. It works only when the table is initially loaded but each time I click a link or filter the table or sort the table, the format reverts back to the old style. I can solve the problem by listing for each event that causes the table to be rerendered by "Data Tables" and then reexucte my changes each time. However it's very tedious. Is there a better way? I don't want to modify dataTables.min.js. Is there a template (that determines the html structure of the pagination and table info) that I can modify to meet my needs?

Answers

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    Hi @meyerauslander@gmail.com ,

    Yep, the best bet is to look at pagingType, see the example here. You can also create your own, or use those created by other - see list here.

    Cheers,

    Colin

  • meyerauslander@gmail.commeyerauslander@gmail.com Posts: 3Questions: 2Answers: 0

    Thanks but I don't think these examples do what I want. I need to make major changes to the DOM. For example I want to but the next and previous links inside ul tags. I need to remove the 'show' select box completely, I need to change "Next" and "Previous" text. I need to change the html contents of the next and previous links etc. I don't think datatables provides the flexability that I need...

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    Hi @meyerauslander@gmail.com ,

    It's very customisable, I'd be surprised if can't do what you're after. This example uses dropdowns, it's one of the plugins I directed you to.

    If you have problems with the customisations, send us a test case, we're happy to take a look,

    Cheers,

    Colin

This discussion has been closed.