Using dom: 'T' to enable TableTools results in incorrectly formatted tables

Using dom: 'T' to enable TableTools results in incorrectly formatted tables

R_GR_G Posts: 31Questions: 10Answers: 0
edited February 2015 in TableTools

Ruby 2, Rails 4, DataTables 1.10.2, jquery-datatables-rails 3.1.1

I need to initialize TableTools in another one of my tables that was just a standard table to enable multi-row selection. That is causing me a lot of problems.

If I use dom: 'T' to initialize TableTools, a lot of the table formatting is lost. It seems that the wrappers and divs disappear. I have tried to correct that using dom: 'Tlfrtip', dom: 'T<"H"lfr>t<"F"ip>', dom: 'T<"clear">lfrtip', dom: '<"H"Tlfr>t<"F"ip>' and many other permutations. Some help, but nothing really gets me a well-formatted table. I had been using jqueryUI, but set that to false during this process as it was unneeded since I use Bootstrap.

Without TableTools initialized, I get:
Correct formatting:
Correct formatting

With TableTools initialized, I get:
Poor formatting:
Poor formatting

As an alternative, I tried the second format of TableTools direct initialization. This worked great for this particular table and all was well. However, I have two other AJAX tables in this app. One uses multi-row selection with an array. The other is just a standard AJAX table. They both quit working using this form of initialization and displayed no data.

Is there some format of DOM that can help me out here? That would be easiest for me. If I have to use direct initialization, I will have to try a deep debug since I use jquery-datatables-rails.

I do have this up on a link. I will email you information as to how to access it.

Thanks for your help. And, thanks again for such a great tool!

This question has an accepted answers - jump to answer


This discussion has been closed.