title: displaying data of datatable column
body: <p>I am using the <a href="http://www.datatables.net/" rel="nofollow">jQuery DataTables plugin</a> on a JSF <code>&lt;h:dataTable&gt;</code>. In this page I have 86 records. </p>
  
  <pre><code>+++++++++++++++++++++++++++++++++++++
  + SN. +    Name    +   Email        +
  +++++++++++++++++++++++++++++++++++++
  +  1  +   Name 1   +  Email 1       +
  +  2  +   Name 2   +  Email 2       +
  +  3  +   Name 3   +  Email 3       +
  +........
  +  4  +   Name 4   +  Email 4       +
  +++++++++++++++++++++++++++++++++++++
  +                 1.2.3.4..... Next +
  +++++++++++++++++++++++++++++++++++++
  </code></pre>
  
  <p>What I want is display the second column data in alert format i.e. display names that will be there on datable. I have 5 set of records per table. SO when I click 1, I should get alert of first 5 records. Once I click 2, I should get names of 6-10 records.</p>
  
  <p>I tried using <code>fnPagingInfo</code> from <a href="http://datatables.net/plug-ins/api" rel="nofollow">this link</a>, but this don't give the info that I am looking for (it gives page number, total page numbers, etc) .</p>
  
  <p><strong>Any idea to get this done?</strong></p>
  
  <hr>
  
  <p>I tried with below.</p>
  
  <pre><code>var cells = [];
  var rows = $("#userList").dataTable().fnGetNodes();
  for(var i=0;i &amp;lt; rows.length;i++)
  {
      cells.push($(rows[i]).find("td:eq(0)").html()); 
  }
  alert(cells);
  </code></pre>
  
  <p>This gives me alert as <code>Name 1, Name 2, Name 3, ...</code></p>
  
  <p>This works perfectly, but the problem occurs when I sort the data... :(</p>
  
  <p>When I sort the data (sort the serial number as 4,3,2,1), I still get alert as <code>Name 1, Name 2, Name 3, ...</code>. </p>
  
  <p>Alert should say <code>Name 4, Name 3, Name 2, ...</code>.</p>
  
  <p>Same is happening with below code also.</p>
  
  <pre><code>var secondCellArray = [];
  $.each(oTable.fnGetData(), function(i, row) {
      secondCellArray.push(row[0]);
  });
  </code></pre>