Feedback and question about TableTools 2.0.1

Feedback and question about TableTools 2.0.1

icebergiceberg Posts: 14Questions: 0Answers: 0
edited April 2011 in TableTools
Feedback and question about TableTools 2.0.1

1. Bug? The code snippet of fnRowSelected function does not work, it even stop the whole datatable function from working. (Neither does fnRowDeselected.)
http://datatables.net/extras/tabletools/initialisation

2. Suggestion. Besides the current "select" and "select_single" button option (mentioned here: http://datatables.net/extras/tabletools/buttons), how about add a new "select_multiple", which will act same as the 'select' option but, this button will only be enabled when more than one row in the table are selected. If less than two rows are selected by the user, the button will go back into the disabled state.

3. Errata. Line 8 of code example for fnSelect misspell as fnClick.
http://datatables.net/extras/tabletools/button_options

4. Discussion. Even after I modify above example to get fnSelect() being triggered, by this code:

{
"sExtends": "select", // "select_single", //"text", // "select_multiple"?
"sButtonText": "Test1",
"fnSelect": function ( nButton, oConfig, nRow ) {
alert( 'Test1: Row selected' + nRow.innerHTML );
}
},

I still don't get the logic why the row-selection callback need to be bind to a button, rather than bind to the row itself. But I can live with the current situation anyway...

But the side-effect (a.k.a. bug) of the "fnSelect" definition, is that the button no longer "will be 'active' when a row is selected in the table (http://www.datatables.net/extras/tabletools/buttons#select)". Same defect applies to customized "select_single" button.


5. Any special reason for this?

{
"sExtends": "select",
"sButtonText": "Test1",
"fnClick": function( nButton, oConfig, flash ) {
// This is fired even when nothing selected and the button is grey. No good.
alert('Test1 's fnClick() is fired');
}
},


6. Do these need to be mentioned in document http://www.datatables.net/extras/tabletools/api ?

{
"sExtends": "select",
"fnClick": function( nButton, oConfig, flash ) {
alert(this.fnGetTableData(oConfig));
// turns out fnGetTableData() is not available for select button
}
}

Likewise, fnSetText() is only available to flash button.



7. Discussion. Select VS Click.

In current datatables's select function designed, if user wants to just click a row in order to trigger a fancybox etc. to have a peek at the detail, he ends up with selecting that row also. Is it possible to redesign the UI to follow the checkbox-column-for-selection de facto standard, so that user can select a row only by checking that box?


8. The pdf export feature seems not work for a table containing non-ascii charactors,
can you confirm that?

Regards,
Ray
This discussion has been closed.