In my datatable I set the ID attribute for rows:
'createdRow': function (row, data, dataIndex) {
$(row).attr('id', data.json.unid);
}
Under a button I want to grab the ID's:
action: function () {
var count = table
.rows({
selected: true
})
.ids();
alert("id:s" + count)
for (i = 0; i < count.length; i++) {
alert("id:" + count[i])
}
rpcService
.setIds(count
.toArray());
}
In the alert I get for the ID "undefined".
Here is what a row looks like:
<tr id="FF97C3CFC0F5FA76C12583D1003EA028" role="row" class="odd selected">
<td class=" select-checkbox"> </td>
<td><a href="0/FF97C3CFC0F5FA76C12583D1003EA028?OpenDocument">Anne Weinstein</a></td>
<td>ORP B</td>
<td><a href="0/FF97C3CFC0F5FA76C12583D1003EA028?OpenDocument">Anne Weinstein</a></td>
<td>s41660</td>
</tr>
What am I doing wrong?