title: Datatables display text of neighboring cell of selected checkboxes as info
body: <p>I'm trying to create a custom <code>info</code> using Datatables. The information that I want to display is the value of second column of the selected row.
  Here's my JS code:</p>
  <pre><code>table = $('#serviceItemList').DataTable({
      // fixedHeader: true,
      // dom: 'piBlrtpi',
      dom: 'Bfirtp',
      info: true,
      columnDefs: [
          {
              targets: 0,
              checkboxes: true
          },
          {
              targets: -1,
              visible: false,
              searchable: false
          },
      ],
      initComplete: function () {
          var api = this.api();
          $('#serviceItemList_info').text('Selected: ');
          selectedCounter = 0;
          api.cells(
              api.rows(function (idx, data, node) {
                  // $('#serviceItemList_info').append(', '+data[2]);
                  return initItems.includes(Number(data[4]));
              }).indexes(),
              0
          ).checkboxes.select();
      },
  });
  
  $('.dt-checkboxes').on('change', ()=&gt;{
      // var api = $('#serviceItemList').dataTable.api();
      console.log($.parseHTML(table.column().checkboxes.selected()[0])[0].value);
      console.log(table.column({ selected: true }).ids(true));
      // console.log(table.cell(this).data());
      // console.log(table.row(this).data());
      // table.api().rows((idx, data, node)=&gt;{
      //     if(selectedCounter==0)
      //         $('#serviceItemList_info').append(data[2]);
      //     else
      //         $('#serviceItemList_info').append(', '+data[2]);
      // });
  });
  </code></pre>
  <p>My problem is that how can I get the selected row data, specifically col 2 (zero-based index) of the table shown.</p>
  <p><a href="https://i.stack.imgur.com/OtlmH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OtlmH.png" alt="enter image description here" /></a></p>