Custom Buttons
Custom Buttons
dkbergstrom
Posts: 3Questions: 0Answers: 0
I have some custom buttons positioned in a particular place that I would like to bind the functionality of TableTools to them. At first I was outputting the HTML snagged from source and removing the entire container during fnComplete. This worked great for NON-IE browsers (using embed), but IE does not use embed properly. TableTools switches to object tags for IE, so my next thought was moving the embed/object tags upon completion by adding code to the fnComplete parameter.
TableTools is not fully initialized at the time fnComplete is executed. The buttons are in place, but the embed/object tags have not been registered with the DOM.
Any ideas on how I can tell the embed/object tags have been created and then move the tags to their new homes?
--
On a separate minor issue. It seams when thead has two rows the language for "copied x rows" is one shy of the actual number of rows in tbody. If I have 4 rows and click the button 4 rows are copied, but the alert indicates only 3 rows were copied.
TableTools is not fully initialized at the time fnComplete is executed. The buttons are in place, but the embed/object tags have not been registered with the DOM.
Any ideas on how I can tell the embed/object tags have been created and then move the tags to their new homes?
--
On a separate minor issue. It seams when thead has two rows the language for "copied x rows" is one shy of the actual number of rows in tbody. If I have 4 rows and click the button 4 rows are copied, but the alert indicates only 3 rows were copied.
This discussion has been closed.
Replies
> On a separate minor issue. It seams when thead has two rows the language for "copied x rows" is one shy of the actual number of rows in tbody
Can you try the TableTools nightly ( http://datatables.net/download ). It should be fixed there :-)
Allan
Buttons
--
I prefer to use unordered lists with a and span tags for the actually buttons. I have a few other buttons related to the table I would like to keep grouped together, such as toggling the tfoot tags.
If I wait until these items have been rendered I can move them and style them accordingly. At this point it just comes down to timing.
Is it possible to add a hook to TableTools, or DataTables, once the DOM has finished rendering the object / embed tags?
Row Count
--
Downloaded the nightly builds of TableTools and DataTables. Both pre and post filter produces one less row than expected still.