How to hide the the export option?

How to hide the the export option?

DeepaliDeepali Posts: 2Questions: 0Answers: 0
edited July 2013 in TableTools
Hi, I have 2 datatables in my app. I need export option for one datatable only. When I use TableTools js, export option is added to both the datatables. Is there any way to show the export option only for particular table? And I have the issue like invisible column also added in export file.

Replies

  • kishsharmakishsharma Posts: 5Questions: 0Answers: 0
    edited July 2013
    Hi, deepali
    There is no inbuilt configuration with jquerydatatable plugin but there is work around for that
    [quote] you can try by this [code] $('div.DTTT_container').eq(1).css('display','none') [/code][/quote]
    where DTTT_container is the class applied for the table tools and by using $('div.DTTT_container') you can access that elements now .eq will access the nth element of same class so if you want to hide second table tools the use eq(1) ,for 3rd eq(2) etc.
    Hope this help you
  • DeepaliDeepali Posts: 2Questions: 0Answers: 0
    Thank you. Its working
  • allanallan Posts: 61,431Questions: 1Answers: 10,048 Site admin
    Or you could just not initialise it on the second table :-)
  • Mani2809Mani2809 Posts: 5Questions: 0Answers: 0
    Hi Allan,
    If I not initialize the secind table table is geting loaded with plain data(with out css and other functionality).
    or
    Where is need to add below code?
    $('div.DTTT_container').eq(1).css('display','none') . What is the argument for .eq() method?
  • allanallan Posts: 61,431Questions: 1Answers: 10,048 Site admin
    > What is the argument for .eq() method?

    jQuery documentation: http://api.jquery.com/eq/

    > Where is need to add below code?

    Anywhere after you have initialised the two tables.

    Allan
This discussion has been closed.