How can I extract a selected row's data on Datatables
<p>I have initialised a simple Datatable:</p>

<pre><code>//initialise table
var dataTable = $('#example').DataTable({
    searching: false,
    responsive: true

});
//hide unnecessary columns
dataTable.columns(1).visible(false);
dataTable.columns(2).visible(false);
dataTable.columns(3).visible(false);
dataTable.columns(4).visible(false);
dataTable.columns(5).visible(false);
dataTable.columns(6).visible(false);
dataTable.columns(7).visible(false);
dataTable.columns(8).visible(false);
</code></pre>

<p>It can contain any number of records but I would like to take the values from all of the columns (only 1 is displayed to the user) and insert them into input fields (which may or may not be visible).  I have successfully been able to select the rows using:</p>

<pre><code>$('#example tbody').on( 'click', 'tr', function () {

       if ( $(this).hasClass('selected') ) {
           $(this).removeClass('selected');
       }
       else {
           dataTable.$('tr.selected').removeClass('selected');
           $(this).addClass('selected');
       }

   });
</code></pre>

<p>I have been looking into the Datatables API, <code>row()</code>, <code>cells()</code> etc and whilst I can view the <code>data()</code> method I simply can't see how to extract data from EACH cell on the row into the input text fields on the same webpage.  I have also looked at  <code>fnGetSelectedData</code> but I didn't get far as it always returned undefined via the console.</p>

<p>To explain the use case, it's essentially an Address Lookup. Each column in the table represents part of the address, I want to take the cells from the selected row and insert it into the form as a users selected address.</p>

<p>Any help is appreciated </p>