Q:

jQuery Datatables - Access Row ID when binding data

I'm using jQuery DataTables and some of my rows have select boxes defined in the columns option array:
ddlOptions = '<option value="val">Text</option>'

"columns": [
    { data: "DateOfService", defaultContent: "" },
    {"defaultContent": "<select id=\"TimeIn1\" class=\"timeDDL\">" + ddlOptions + "</select>"},
    {"defaultContent": "<select id=\"TimeOut1\" class=\"timeDDL\">" + ddlOptions + "</select>"}
]

When I create the select boxes, all the id's are going to be the same, so I need to give them all individual id's.  I was thinking I can just use the RowId property from my dataset, but how would I go about doing so?

A:

After more digging I found this page: http://datatables.net/reference/option/columns.render
On it, it has the following example:
$('#example').dataTable( {
  "columnDefs": [ {
    "targets": 0,
    "data": "download_link",
    "render": function ( data, type, full, meta ) {
      return '<a href="'+data+'">Download</a>';
    }
  } ]
});

The full parameter contains all of my Row data, which is just what I needed.  Hope this helps someone else...

