Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35379

Applying ID or data- to retrieve TD value

$
0
0

I'm needing to obtain a value of row's cell ID because I'm going to use the value in another function call. For example, in reference to the columns below, I need to obtain the "Clientid" value of a cell when I click on the row's print-control. Generally, I can easily obtain the value via JQuery or native Javascript but I don't know datatables well enough to get say the 3rd row's client id.

DataTable:

   table = $('#processer').DataTable({
      "paging": false,
      "ordering": true,
      "info": false,
      "searching": false,
      "ajax": "/calling/json/data",
      "columns": [
        {
          "class": 'print-control',
          "orderable": false,
          "data": null,
          "defaultContent": ''
        },
        { "data": "DT_RowId" },
        { "data": "Firstname" },
        { "data": "Lastname" },
        { "data": "RequestCount" },
        {
          "data": "Clientid"
        },
        { "data": "RequestLowest" },
        { "data": "Length" }
      ],
      "order": [[6, 'asc']] //default sort order to first column ascending
    });

Viewing all articles
Browse latest Browse all 35379

Trending Articles