How to hide the the export option?
How to hide the the export option?
Deepali
Posts: 2Questions: 0Answers: 0
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.
This discussion has been closed.
Replies
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
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?
jQuery documentation: http://api.jquery.com/eq/
> Where is need to add below code?
Anywhere after you have initialised the two tables.
Allan