Pagination issue

Pagination issue

Aditya14Aditya14 Posts: 27Questions: 5Answers: 0

Hi,

I need to show first and last (i.e. full length pagination) only when there are more records let us say more than 15 rows than only not when less or no records are there.Is there any possibility to do that.

Answers

  • colincolin Posts: 15,235Questions: 1Answers: 2,597

    Hi Aditya14,

    I don't think you can with the DataTables API, but you can hide and show various elements with a jQuery statement. For example, the following commands will hide and show the pagination bar:

    $('.paginate_button').hide()
    $('.paginate_button').show()
    

    You could mix this with a loading event, determine how many records are present, and hide/show as appropriate.

    Cheers,

    Colin

This discussion has been closed.