Absolutely - you'd use something like this example: http://editor.datatables.net/release/DataTables/extras/Editor/examples/inlineControls.html - but rather than attaching the event handler to the `a` link in the table cells, you'd attach it to the `tr` element (i.e the table row).
Replies
Allan
[code]
$('#table_id').on('click', 'tr', function (e) {
e.preventDefault();
editor.edit(
$(this).parents('tr')[0],
'Edit record',
{ "label": "Update", "fn": function () { editor.submit() } }
);
} );
[/code]
but it doesn´t work :( Any idea Allan?
Thank you!
> $(this).parents('tr')[0]
suggests. `this` is already the `tr` element, so just pass it in rather than trying to walk back up the DOM tree.
Allan
I paste the solution:
[code]
$('#competitive_prices tbody').on('click', 'tr', function (e) {
e.preventDefault();
editor.edit(
this,
'Edit record',
{ "label": "Update", "fn": function () { editor.submit() } }
);
} );
[/code]
Bye!