Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

Get DataTable settings

$
0
0
Hello, I'm having problems find out how to get settings of some datatable. I have
$dt = dataTable({ ... })

I did figure out that I can use this hack
$dt.DataTable.settings[0]
but it's of course not working if I'm adding tables dynamically.

I need to get this, so I can get mData name for cell that I click on

$vc.on('click', 'td', function(){
  var cell_name = $dt
    .DataTable.settings[0]
    .aoColumns[$dt.fnGetPosition( this )[2]] // as I'm dynamically hiding columns, I get original position of column
    .mData

Is there any way to get settings for $dt or get mData for td clicked from existing API outside of datatable module?

Viewing all articles
Browse latest Browse all 1816

Trending Articles