Hide or Disable all the components of DataTables.

Hide or Disable all the components of DataTables.

vyasnikulvyasnikul Posts: 2Questions: 0Answers: 0

First of all this tool is superb and coder friendly, thank you so much for that. I am trying to learn and explore the library. I am using to it on the table and to save the updates of the table I need to check the acknowledgment checkbox in which I have to disable or hide all the controls of the HTML table. Is there any provision for that because pagingType has option to show something at the least. Moreover, I am overriding the lengthMenu to show all records so when I select the option to "show all" is it possible to disable or hide all the page numbers & first, next, previous, last buttons?

Replies

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

    Hi @vyasnikul ,

    You can remove the controls with dom, but you can only do that at initialisation. So, when that checkbox is pressed, you could do something like this here.

    Cheers,

    Colin

  • vyasnikulvyasnikul Posts: 2Questions: 0Answers: 0
    edited August 2019

    @colin That worked out for me thanks, also as an alternative I found out that we can invoke the div element by id and hide it manually.

    For Eg:

     $('#data_paginate').hide(); // div container for page numbers
     $('#data_length').hide(); // div container for length
    
  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Yep, I would us dom though - as the element IDs may change in future releases.

This discussion has been closed.