DataTables / TableTools

Please note that TableTools has now been retired and replaced by the Buttons and Select extensions which offers significant improvements and API integration with the rest of DataTables and the other extensions.
http://datatables.net/
Other
237 stars 149 forks source link

Add mDeselectColumns or fnDeselectCell #17

Open waiting-for-dev opened 11 years ago

waiting-for-dev commented 11 years ago

Hi,

I'm trying to export the content of a table which first column cells have only a checkbox input. So, I would like to exclude that first column of exportation.

However, that's not that easy as mColumns: [1, 2], because from the rest of columns I only want the visible ones to get exported and, as far as I know, I can't use both mColumns string and array notation at the same time.

For my purpose I would need a mDeselectColumns to do something like that:

mColumns: 'visible',
mDeselectColumns: [0]

I think my situation may be quite common, because a lot of CRUD generator automatically create that kind of action columns, and if you want to add some other dynamism as column hiding I think right now you don't have a way to go.

Thanks a lot for this amazing plugin!

DataTables commented 11 years ago

This sounds like a good idea. We could end up with a case where someone has both enabled and disabled a column from export, but that would be a configuration error I'd say.

So yes, I'll look at including this in a future version of TableTOols. Perhaps v3 once DataTables 1.10 is done.

waiting-for-dev commented 11 years ago

Or maybe mDeselectColumns should have preference over the selection configuration ones...

Thank you!